app/models/concerns/state_transition_support.rb
# Returns state to which given event will transition the record
Returns state to which given event will transition the record
Returns state to which given event will transition the record
def event_to_state(event)
      to_states = {}
      self.states_events_config.each { |se| to_states[se[:event]] = se[:to_state] }
      to_states[event]
    end
def event_to_state ( event ) to_states = { } self . states_events_config . each { | se | to_states [ se [ :event ] ] = se [ :to_state ] } to_states [ event ] end
Returns state to which given event will transition the record
Returns state to which given event will transition the record
event
<not_specific>