diff options
Diffstat (limited to 'activerecord/lib')
4 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index 1e324c7e95..99f307922e 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -240,7 +240,6 @@ module ActiveRecord skip_assign = [reflection.foreign_key, reflection.type].compact attributes = create_scope.except(*(record.changed - skip_assign)) record.assign_attributes(attributes, :without_protection => true) - set_inverse_instance(record) end end end diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index c2dd462b5d..baddb9852f 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -350,6 +350,7 @@ module ActiveRecord end callback(:after_add, record) + set_inverse_instance(record) record end diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index b734fc5c51..93fa30eb38 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -151,7 +151,7 @@ module ActiveRecord values = other.joins_values return if values.blank? - if other.klass == relation.klass + if other.klass >= relation.klass relation.joins_values += values else joins_dependency, rest = values.partition do |join| diff --git a/activerecord/lib/active_record/version.rb b/activerecord/lib/active_record/version.rb index 9e3d1539c6..1f4e2eaf2c 100644 --- a/activerecord/lib/active_record/version.rb +++ b/activerecord/lib/active_record/version.rb @@ -2,8 +2,8 @@ module ActiveRecord module VERSION #:nodoc: MAJOR = 3 MINOR = 2 - TINY = 14 - PRE = nil + TINY = 15 + PRE = "rc3" STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.') end |