diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-10-31 00:37:13 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-18 08:35:04 -0200 |
commit | 1127262a610486ff54596967e6707a78e944b502 (patch) | |
tree | 958e92a9429ecf1c5f7de96df070c31335b9d74e | |
parent | 23750b4733e1d8e7ef334d70998258d1d2e2c6c8 (diff) | |
download | rails-1127262a610486ff54596967e6707a78e944b502.tar.gz rails-1127262a610486ff54596967e6707a78e944b502.tar.bz2 rails-1127262a610486ff54596967e6707a78e944b502.zip |
Change relation in place
-rw-r--r-- | activerecord/lib/active_record/validations/uniqueness.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index 5700350cf9..2a4a70cd59 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -33,7 +33,7 @@ module ActiveRecord 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) |