You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1324,8 +1326,10 @@ class ChildWithDeprecatedBehaviorResolved < ClassWithDeprecatedAliasAttributeBeh
1324
1326
1325
1327
test"#alias_attribute with an _in_database method issues a deprecation warning"do
1326
1328
message=<<~MESSAGE.gsub("\n"," ")
1327
-
AttributeMethodsTest::ClassWithGeneratedAttributeMethodTarget model aliases `title_in_database`, but title_in_database is not an attribute.
1328
-
Starting in Rails 7.2 `, alias_attribute with non-attribute targets will raise. Use `alias_method :saved_title`, :title_in_database or define the method manually.
1329
+
AttributeMethodsTest::ClassWithGeneratedAttributeMethodTarget model aliases
1330
+
`title_in_database`, but `title_in_database` is not an attribute.
1331
+
Starting in Rails 7.2, alias_attribute with non-attribute targets will raise.
1332
+
Use `alias_method :saved_title, :title_in_database` or define the method manually.
@@ -1350,9 +1354,7 @@ class ChildWithDeprecatedBehaviorResolved < ClassWithDeprecatedAliasAttributeBeh
1350
1354
1351
1355
test"#alias_attribute with enum method issues a deprecation warning"do
1352
1356
message=<<~MESSAGE.gsub("\n"," ")
1353
-
AttributeMethodsTest::ClassWithEnumMethodTarget model aliases `pending?`, but pending? is not an attribute.
1354
-
Starting in Rails 7.2 `, alias_attribute with non-attribute targets will raise.
1355
-
Use `alias_method :is_pending?`, :pending? or define the method manually.
1357
+
AttributeMethodsTest::ClassWithEnumMethodTarget model aliases `pending?`, but `pending?` is not an attribute. Starting in Rails 7.2, alias_attribute with non-attribute targets will raise. Use `alias_method :is_pending?, :pending?` or define the method manually.
@@ -1372,9 +1374,7 @@ class ChildWithDeprecatedBehaviorResolved < ClassWithDeprecatedAliasAttributeBeh
1372
1374
1373
1375
test"#alias_attribute with an association method issues a deprecation warning"do
1374
1376
message=<<~MESSAGE.gsub("\n"," ")
1375
-
AttributeMethodsTest::ClassWithAssociationTarget model aliases `author`, but author is not an attribute.
1376
-
Starting in Rails 7.2 `, alias_attribute with non-attribute targets will raise.
1377
-
Use `alias_method :written_by`, :author or define the method manually.
1377
+
AttributeMethodsTest::ClassWithAssociationTarget model aliases `author`, but `author` is not an attribute. Starting in Rails 7.2, alias_attribute with non-attribute targets will raise. Use `alias_method :written_by, :author` or define the method manually.
0 commit comments