Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 5fd7118cbcbdac7a5d4c82ea811a8d97b6ce6c10 1 parent d08f838
@dhh dhh authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/base.rb
View
4 activerecord/lib/active_record/base.rb
@@ -947,7 +947,7 @@ def find_from_ids(ids, options)
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 @@ def find_one(id, options)
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)
Please sign in to comment.
Something went wrong with that request. Please try again.