diff options
author | Vipul A M <vipulnsward@gmail.com> | 2013-03-27 11:09:40 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2013-03-27 18:03:21 +0530 |
commit | c082e3f615a078364172f0a6d8a335d6bf353d94 (patch) | |
tree | 755694992f4251c0aa7fd7090a1804b3da0618c1 /activerecord | |
parent | c56e6204dbc622f40745e6e5f22172b435e3b962 (diff) | |
download | rails-c082e3f615a078364172f0a6d8a335d6bf353d94.tar.gz rails-c082e3f615a078364172f0a6d8a335d6bf353d94.tar.bz2 rails-c082e3f615a078364172f0a6d8a335d6bf353d94.zip |
drop variable assignment in validations
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/validations.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 3706885881..26dca415ff 100644 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -74,8 +74,7 @@ module ActiveRecord protected def perform_validations(options={}) # :nodoc: - perform_validation = options[:validate] != false - perform_validation ? valid?(options[:context]) : true + options[:validate] == false || valid?(options[:context]) end end end |