diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 3 | ||||
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index fa55eb147d..6f940f0d0f 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,9 +1,12 @@ *SVN* +* Fixed that :includes merged from with_scope won't cause the same association to be loaded more than once if repetition occurs in the clauses #5253 [alex@purefiction.net] + * Allow models to override to_xml. #4989 [Blair Zajac <blair@orcaware.com>] * PostgreSQL: don't ignore port when host is nil since it's often used to label the domain socket. #5247 [shimbo@is.naist.jp] +>>>>>>> .r4414 * Records and arrays of records are bound as quoted ids. [Jeremy Kemper] Foo.find(:all, :conditions => ['bar_id IN (?)', bars]) Foo.find(:first, :conditions => ['bar_id = ?', bar]) diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 0a81681126..1583c28efe 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1022,7 +1022,7 @@ module ActiveRecord #:nodoc: # Merges includes so that the result is a valid +include+ def merge_includes(first, second) - safe_to_array(first) + safe_to_array(second) + (safe_to_array(first) + safe_to_array(second)).uniq end # Object#to_a is deprecated, though it does have the desired behavior |