diff options
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
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 |