diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 2d3e6723ad..bacb9d714e 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Delete the deprecated constant `ActiveRecord::ImmutableRelation`. + + *Xavier Noria* + * Fix duplicate callback execution when child autosaves parent with `has_one` and `belongs_to`. Before, persisting a new child record with a new associated parent record would run `before_validation`, diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb index 0065e65f83..bc039f19aa 100644 --- a/activerecord/lib/active_record/errors.rb +++ b/activerecord/lib/active_record/errors.rb @@ -484,11 +484,6 @@ def initialize(model = nil, description = nil) # relation.limit!(5) # => ActiveRecord::UnmodifiableRelation class UnmodifiableRelation < ActiveRecordError end - deprecate_constant( - :ImmutableRelation, - "ActiveRecord::UnmodifiableRelation", - deprecator: ActiveRecord.deprecator - ) # TransactionIsolationError will be raised under the following conditions: # diff --git a/activerecord/test/cases/errors_test.rb b/activerecord/test/cases/errors_test.rb index 4843529566..4f701a2085 100644 --- a/activerecord/test/cases/errors_test.rb +++ b/activerecord/test/cases/errors_test.rb @@ -16,11 +16,4 @@ def test_can_be_instantiated_with_no_args end end end - - def test_active_record_immutable_relation_deprecation - expected_message = "ActiveRecord::ImmutableRelation is deprecated! Use ActiveRecord::UnmodifiableRelation instead" - assert_deprecated(expected_message, ActiveRecord.deprecator) do - assert_same ActiveRecord::UnmodifiableRelation, ActiveRecord::ImmutableRelation - end - end end