Skip to content

Commit

Permalink
drop variable assignment in validations
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulnsward committed Mar 27, 2013
1 parent c56e620 commit c082e3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions activerecord/lib/active_record/validations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c082e3f

Please sign in to comment.