Module: ActiveRecord::Transitions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_record/transitions.rb
Instance Method Summary collapse
-
#reload(options = nil) ⇒ Object
The optional options argument is passed to find when reloading so you may do e.g.
Instance Method Details
#reload(options = nil) ⇒ 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.
37 38 39 40 41 42 43 |
# File 'lib/active_record/transitions.rb', line 37 def reload( = nil) super.tap do self.class.state_machines.values.each do |sm| remove_instance_variable(sm.current_state_variable) if instance_variable_defined?(sm.current_state_variable) end end end |