class ActiveSupport::CurrentAttributes

def before_reset(*methods, &block)

Calls this callback before #reset is called on the instance. Used for resetting external collaborators that depend on current values.
def before_reset(*methods, &block)
  set_callback :reset, :before, *methods, &block
end