aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/CHANGELOG.md4
-rw-r--r--activerecord/lib/active_record/core.rb5
-rw-r--r--activerecord/test/cases/relations_test.rb6
3 files changed, 11 insertions, 4 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 12c5ea7adc..f59f79112e 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,7 +1,3 @@
-* Remove deprecated `ActiveRecord::Base.disable_implicit_join_references=`.
-
- *Arun Agrawal*
-
* Remove deprecated nil-passing to the following `SchemaCache` methods:
`primary_keys`, `tables`, `columns` and `columns_hash`.
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 45239c2f79..c6b7da2e3c 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -69,6 +69,11 @@ module ActiveRecord
mattr_accessor :timestamped_migrations, instance_writer: false
self.timestamped_migrations = true
+ def self.disable_implicit_join_references=(value)
+ ActiveSupport::Deprecation.warn("Implicit join references were removed with Rails 4.1." \
+ "Make sure to remove this configuration because it does nothing.")
+ end
+
class_attribute :default_connection_handler, instance_writer: false
def self.connection_handler
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index ac769ea90a..b205472cf5 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -1216,6 +1216,12 @@ class RelationTest < ActiveRecord::TestCase
assert_equal "id", Post.all.primary_key
end
+ def test_disable_implicit_join_references_is_deprecated
+ assert_deprecated do
+ ActiveRecord::Base.disable_implicit_join_references = true
+ end
+ end
+
def test_ordering_with_extra_spaces
assert_equal authors(:david), Author.order('id DESC , name DESC').last
end