diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-04-01 06:57:43 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-04-01 06:57:43 +0000 |
commit | 5fd7118cbcbdac7a5d4c82ea811a8d97b6ce6c10 (patch) | |
tree | 5838373600fb2a7ee447a3d8d6124ebb7e65ed2f | |
parent | d08f838c0e4d626a1b78c7799e0cad878ce4943c (diff) | |
download | rails-5fd7118cbcbdac7a5d4c82ea811a8d97b6ce6c10.tar.gz rails-5fd7118cbcbdac7a5d4c82ea811a8d97b6ce6c10.tar.bz2 rails-5fd7118cbcbdac7a5d4c82ea811a8d97b6ce6c10.zip |
dont merge when you can update (closes #4529) [skaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 8078b4113b..1013251b0a 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -947,7 +947,7 @@ module ActiveRecord #:nodoc: def find_one(id, options) conditions = " AND (#{sanitize_sql(options[:conditions])})" if options[:conditions] - options = options.merge :conditions => "#{table_name}.#{primary_key} = #{sanitize(id)}#{conditions}" + options.update :conditions => "#{table_name}.#{primary_key} = #{sanitize(id)}#{conditions}" if result = find_initial(options) result @@ -959,7 +959,7 @@ module ActiveRecord #:nodoc: def find_some(ids, options) conditions = " AND (#{sanitize_sql(options[:conditions])})" if options[:conditions] ids_list = ids.map { |id| sanitize(id) }.join(',') - options = options.merge :conditions => "#{table_name}.#{primary_key} IN (#{ids_list})#{conditions}" + options.update :conditions => "#{table_name}.#{primary_key} IN (#{ids_list})#{conditions}" result = find_every(options) |