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