Permalink
Browse files

drop variable assignment in validations

  • Loading branch information...
1 parent c56e620 commit c082e3f615a078364172f0a6d8a335d6bf353d94 @vipulnsward vipulnsward committed Mar 27, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 activerecord/lib/active_record/validations.rb
@@ -74,8 +74,7 @@ def valid?(context = nil)
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

0 comments on commit c082e3f

Please sign in to comment.