aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--RAILS_VERSION2
-rw-r--r--actionmailer/lib/action_mailer/version.rb4
-rw-r--r--actionpack/lib/action_pack/version.rb4
-rw-r--r--activemodel/lib/active_model/version.rb4
-rw-r--r--activerecord/CHANGELOG.md6
-rw-r--r--activerecord/lib/active_record/associations/association.rb1
-rw-r--r--activerecord/lib/active_record/associations/collection_association.rb1
-rw-r--r--activerecord/lib/active_record/relation/spawn_methods.rb2
-rw-r--r--activerecord/lib/active_record/version.rb4
-rw-r--r--activerecord/test/cases/associations/inverse_associations_test.rb4
-rw-r--r--activerecord/test/cases/inheritance_test.rb5
-rw-r--r--activerecord/test/models/company.rb5
-rw-r--r--activeresource/lib/active_resource/version.rb4
-rw-r--r--activesupport/lib/active_support/version.rb4
-rw-r--r--railties/lib/rails/version.rb4
-rw-r--r--version.rb4
16 files changed, 30 insertions, 28 deletions
diff --git a/RAILS_VERSION b/RAILS_VERSION
index 23c635a1e0..820871cba3 100644
--- a/RAILS_VERSION
+++ b/RAILS_VERSION
@@ -1 +1 @@
-3.2.14
+3.2.15.rc3
diff --git a/actionmailer/lib/action_mailer/version.rb b/actionmailer/lib/action_mailer/version.rb
index 6f596710d4..145eb38dce 100644
--- a/actionmailer/lib/action_mailer/version.rb
+++ b/actionmailer/lib/action_mailer/version.rb
@@ -2,8 +2,8 @@ module ActionMailer
module VERSION #:nodoc:
MAJOR = 3
MINOR = 2
- TINY = 14
- PRE = nil
+ TINY = 15
+ PRE = "rc3"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
diff --git a/actionpack/lib/action_pack/version.rb b/actionpack/lib/action_pack/version.rb
index 993c5d7d2a..be1462b43e 100644
--- a/actionpack/lib/action_pack/version.rb
+++ b/actionpack/lib/action_pack/version.rb
@@ -2,8 +2,8 @@ module ActionPack
module VERSION #:nodoc:
MAJOR = 3
MINOR = 2
- TINY = 14
- PRE = nil
+ TINY = 15
+ PRE = "rc3"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
diff --git a/activemodel/lib/active_model/version.rb b/activemodel/lib/active_model/version.rb
index 8fdcf687fd..78d39dd888 100644
--- a/activemodel/lib/active_model/version.rb
+++ b/activemodel/lib/active_model/version.rb
@@ -2,8 +2,8 @@ module ActiveModel
module VERSION #:nodoc:
MAJOR = 3
MINOR = 2
- TINY = 14
- PRE = nil
+ TINY = 15
+ PRE = "rc3"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 5107e43b55..cf1f20c829 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,10 +1,4 @@
## unreleased ##
-* Move .set_inverse_instance call to association.build_record method. Everytime a new record is build
- using the association, we need to try to set the inverse_of relation.
-
- Fixes #10371.
-
- *arthurnn*
* When calling the method .find_or_initialize_by_* from a collection_proxy
it should set the inverse_of relation even when the entry was found on the db.
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
diff --git a/activerecord/test/cases/associations/inverse_associations_test.rb b/activerecord/test/cases/associations/inverse_associations_test.rb
index 51e466ecac..0cab6faa25 100644
--- a/activerecord/test/cases/associations/inverse_associations_test.rb
+++ b/activerecord/test/cases/associations/inverse_associations_test.rb
@@ -125,10 +125,8 @@ class InverseHasOneTests < ActiveRecord::TestCase
end
def test_parent_instance_should_be_shared_with_newly_created_child
- m = Man.create
+ m = Man.find(:first)
f = m.create_face(:description => 'haunted')
-
- assert_equal m.object_id, f.man.object_id
assert_not_nil f.man
assert_equal m.name, f.man.name, "Name of man should be the same before changes to parent instance"
m.name = 'Bongo'
diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb
index 99a252a389..e4cd89e563 100644
--- a/activerecord/test/cases/inheritance_test.rb
+++ b/activerecord/test/cases/inheritance_test.rb
@@ -236,6 +236,11 @@ class InheritanceTest < ActiveRecord::TestCase
assert_nothing_raised { s = SpecialSubscriber.new("name" => "And breaaaaathe!"); s.id = 'roger'; s.save }
end
+ def test_scope_inherited_properly
+ assert_nothing_raised { Company.of_first_firm }
+ assert_nothing_raised { Client.of_first_firm }
+ end
+
private
def switch_to_alt_inheritance_column
# we don't want misleading test results, so get rid of the values in the type column
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb
index c9168981fc..3b2b79c83d 100644
--- a/activerecord/test/models/company.rb
+++ b/activerecord/test/models/company.rb
@@ -12,6 +12,11 @@ class Company < AbstractCompany
has_many :contracts
has_many :developers, :through => :contracts
+ scope :of_first_firm, lambda {
+ joins(:account => :firm).
+ where('firms.id' => 1)
+ }
+
def arbitrary_method
"I am Jack's profound disappointment"
end
diff --git a/activeresource/lib/active_resource/version.rb b/activeresource/lib/active_resource/version.rb
index b1dd63a363..a68364fb1d 100644
--- a/activeresource/lib/active_resource/version.rb
+++ b/activeresource/lib/active_resource/version.rb
@@ -2,8 +2,8 @@ module ActiveResource
module VERSION #:nodoc:
MAJOR = 3
MINOR = 2
- TINY = 14
- PRE = nil
+ TINY = 15
+ PRE = "rc3"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
diff --git a/activesupport/lib/active_support/version.rb b/activesupport/lib/active_support/version.rb
index 8b9d3bcdca..122cea70e7 100644
--- a/activesupport/lib/active_support/version.rb
+++ b/activesupport/lib/active_support/version.rb
@@ -2,8 +2,8 @@ module ActiveSupport
module VERSION #:nodoc:
MAJOR = 3
MINOR = 2
- TINY = 14
- PRE = nil
+ TINY = 15
+ PRE = "rc3"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
diff --git a/railties/lib/rails/version.rb b/railties/lib/rails/version.rb
index a5531699b4..4158cd398b 100644
--- a/railties/lib/rails/version.rb
+++ b/railties/lib/rails/version.rb
@@ -2,8 +2,8 @@ module Rails
module VERSION #:nodoc:
MAJOR = 3
MINOR = 2
- TINY = 14
- PRE = nil
+ TINY = 15
+ PRE = "rc3"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
diff --git a/version.rb b/version.rb
index a5531699b4..4158cd398b 100644
--- a/version.rb
+++ b/version.rb
@@ -2,8 +2,8 @@ module Rails
module VERSION #:nodoc:
MAJOR = 3
MINOR = 2
- TINY = 14
- PRE = nil
+ TINY = 15
+ PRE = "rc3"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end