Module: Mongoid::EdgeStateMachine::ClassMethods
- Defined in:
- lib/mongoid/edge-state-machine.rb
Instance Method Summary collapse
Instance Method Details
#add_scope(state, machine_name) ⇒ Object
72 73 74 75 |
# File 'lib/mongoid/edge-state-machine.rb', line 72 def add_scope(state, machine_name) machine = state_machines[machine_name] scope state.name, where(machine.persisted_variable_name.to_sym => state.name.to_s) end |