mirror of https://github.com/rails/rails
Delete the deprecated constant ActiveRecord::ImmutableRelation
This commit is contained in:
parent
5b0e7a31bb
commit
32c5a358bb
|
@ -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`,
|
||||
|
|
|
@ -484,11 +484,6 @@ module ActiveRecord
|
|||
# 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:
|
||||
#
|
||||
|
|
|
@ -16,11 +16,4 @@ class ErrorsTest < ActiveRecord::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue