instance method
deprecate
Ruby on Rails 7.0.10
Since v7.0.10 Last seen in v7.0.10Signature
deprecate(action)
No documentation comment.
Parameters
-
actionreq
Source
# File activestorage/lib/active_storage/attached/model.rb, line 184
def deprecate(action)
reflection_name = proxy_association.reflection.name
attached_name = reflection_name.to_s.partition("_").first
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Calling `#{action}` from `#{reflection_name}` is deprecated and will be removed in Rails 7.1.
To migrate to Rails 7.1's behavior call `#{action}` from `#{attached_name}` instead: `#{attached_name}.#{action}`.
MSG
end
Defined in activestorage/lib/active_storage/attached/model.rb line 184
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Attached::Model