aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-04-30 14:04:01 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-04-30 14:04:01 +0000
commit787951348bd498ef16e0c2f24aa677499bc6b1ef (patch)
tree52e59d9b7623a5c3eefc5f3cf322c21c1c95689f /activerecord
parent9f1b57779ff3db4f7ef6bfb9e7d1670972340896 (diff)
downloadrails-787951348bd498ef16e0c2f24aa677499bc6b1ef.tar.gz
rails-787951348bd498ef16e0c2f24aa677499bc6b1ef.tar.bz2
rails-787951348bd498ef16e0c2f24aa677499bc6b1ef.zip
Fixed incompatibility with Base#find with an array of ids that would fail when using eager loading #1186 [Alisdair McDiarmid]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1259 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG2
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index d70800b9ef..84b7f61f0f 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed incompatibility with Base#find with an array of ids that would fail when using eager loading #1186 [Alisdair McDiarmid]
+
* Fixed that validate_length_of lost :on option when :within was specified #1195 [jhosteny@mac.com]
* Added encoding and min_messages options for PostgreSQL #1205 [shugo]. Configuration example:
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index df91180332..8136e101f4 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -349,7 +349,7 @@ module ActiveRecord #:nodoc:
else
# Find multiple ids
ids_list = ids.map { |id| sanitize(id) }.join(',')
- result = find(:all, options.merge({ :conditions => "#{table_name}.#{primary_key} IN (#{ids_list})#{conditions}", :order => primary_key }))
+ result = find(:all, options.merge({ :conditions => "#{table_name}.#{primary_key} IN (#{ids_list})#{conditions}"}))
if result.size == ids.size
return result
else