Module: ActiveModel::Transitions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_model/transitions.rb
Instance Method Summary collapse
-
#reload ⇒ Object
The optional options argument is passed to find when reloading so you may do e.g.
Instance Method Details
#reload ⇒ Object
The optional options argument is passed to find when reloading so you may do e.g. record.reload(:lock => true) to reload the same record with an exclusive row lock.
35 36 37 38 39 40 |
# File 'lib/active_model/transitions.rb', line 35 def reload(*) super.tap do sm = self.class.get_state_machine remove_instance_variable(sm.current_state_variable) if instance_variable_defined?(sm.current_state_variable) end end |