Module: SolidState
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/solidstate.rb
Defined Under Namespace
Modules: ClassMethods Classes: InvalidTransitionError
Constant Summary collapse
- STATE_ATTRIBUTE =
:state.freeze
Instance Method Summary collapse
Instance Method Details
#set_state(new_state) ⇒ Object
71 72 73 74 |
# File 'lib/solidstate.rb', line 71 def set_state(new_state) return false unless can_transition_to?(new_state) self.state = new_state end |