class method
self.before_reset
Ruby on Rails 7.1.6
Since v6.0.6Signature
self.before_reset(*methods, &block)
Calls this callback before #reset is called on the instance. Used for resetting external collaborators that depend on current values.
Parameters
-
methodsrest -
blockblock
Source
# File activesupport/lib/active_support/current_attributes.rb, line 146
def before_reset(*methods, &block)
set_callback :reset, :before, *methods, &block
end
Defined in activesupport/lib/active_support/current_attributes.rb line 146
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::CurrentAttributes