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
# If present, this has to be a hash with keys +:mode+ and/or +:backtrace+.
1115
+
#
1116
+
# ==== Mode
1117
+
#
1118
+
# * In +:warn+ mode, usage issues a warning that includes the
1119
+
# application-level place where the access happened, if any. This is the
1120
+
# default mode.
1121
+
#
1122
+
# * In +:raise+ mode, usage raises an
1123
+
# ActiveRecord::DeprecatedAssociationError with a similar message and a
1124
+
# clean backtrace in the exception object.
1125
+
#
1126
+
# * In +:notify+ mode, a <tt>deprecated_association.active_record</tt>
1127
+
# Active Support notification is published. The event payload has the
1128
+
# association reflection (+:reflection+), the application-level location
1129
+
# (+:location+) where the access happened (a Thread::Backtrace::Location
1130
+
# object, or +nil+), and a deprecation message (+:message+).
1131
+
#
1132
+
# ==== Backtrace
1133
+
#
1134
+
# If :backtrace is true, warnings include a clean backtrace in the message
1135
+
# and notifications have a +:backtrace+ key in the payload with an array
1136
+
# of clean Thread::Backtrace::Location objects. Exceptions always get a
1137
+
# clean stack trace set.
1138
+
#
1139
+
# Clean backtraces are computed using the Active Record backtrace cleaner.
1140
+
# In Rails applications, that is by the default the same as
1141
+
# <tt>Rails.backtrace_cleaner</tt>.
1142
+
#
1023
1143
# == Type safety with ActiveRecord::AssociationTypeMismatch
1024
1144
#
1025
1145
# If you attempt to assign an object to an association that doesn't match the inferred
@@ -1287,6 +1407,9 @@ module ClassMethods
1287
1407
# Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered <b>before an object is removed</b> from the association collection.
1288
1408
# [:after_remove]
1289
1409
# Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered <b>after an object is removed</b> from the association collection.
1410
+
# [+:deprecated+]
1411
+
# If true, marks the association as deprecated. Usage of deprecated associations is reported.
1412
+
# Please, check the class documentation above for details.
0 commit comments