Permalink
Browse files

Change relation in place

  • Loading branch information...
1 parent 23750b4 commit 1127262a610486ff54596967e6707a78e944b502 @carlosantoniodasilva carlosantoniodasilva committed Oct 31, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/validations/uniqueness.rb
@@ -33,7 +33,7 @@ def validate_each(record, attribute, value)
end
relation = finder_class.unscoped.where(relation)
- relation = relation.merge(options[:conditions]) if options[:conditions]
+ relation.merge!(options[:conditions]) if options[:conditions]
if relation.exists?
error_options = options.except(:case_sensitive, :scope, :conditions)

0 comments on commit 1127262

Please sign in to comment.