diff options
Diffstat (limited to 'activerecord/lib/active_record/validations.rb')
-rw-r--r-- | activerecord/lib/active_record/validations.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index e4c366ea63..f367315b22 100644 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -60,11 +60,7 @@ module ActiveRecord def perform_validations(options={}) perform_validation = options[:validate] != false - if perform_validation - valid?(options.is_a?(Hash) ? options[:context] : nil) - else - true - end + perform_validation ? valid?(options[:context]) : true end end end |