Skip to content

Commit 32c5a35

Browse files
committed
Delete the deprecated constant ActiveRecord::ImmutableRelation
1 parent 5b0e7a3 commit 32c5a35

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

activerecord/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Delete the deprecated constant `ActiveRecord::ImmutableRelation`.
2+
3+
*Xavier Noria*
4+
15
* Fix duplicate callback execution when child autosaves parent with `has_one` and `belongs_to`.
26

37
Before, persisting a new child record with a new associated parent record would run `before_validation`,

activerecord/lib/active_record/errors.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,6 @@ def initialize(model = nil, description = nil)
484484
# relation.limit!(5) # => ActiveRecord::UnmodifiableRelation
485485
class UnmodifiableRelation < ActiveRecordError
486486
end
487-
deprecate_constant(
488-
:ImmutableRelation,
489-
"ActiveRecord::UnmodifiableRelation",
490-
deprecator: ActiveRecord.deprecator
491-
)
492487

493488
# TransactionIsolationError will be raised under the following conditions:
494489
#

activerecord/test/cases/errors_test.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,4 @@ def test_can_be_instantiated_with_no_args
1616
end
1717
end
1818
end
19-
20-
def test_active_record_immutable_relation_deprecation
21-
expected_message = "ActiveRecord::ImmutableRelation is deprecated! Use ActiveRecord::UnmodifiableRelation instead"
22-
assert_deprecated(expected_message, ActiveRecord.deprecator) do
23-
assert_same ActiveRecord::UnmodifiableRelation, ActiveRecord::ImmutableRelation
24-
end
25-
end
2619
end

0 commit comments

Comments
 (0)