Module: AASM::Persistence::NoBrainerPersistence::ClassMethods

Defined in:
lib/aasm/persistence/no_brainer_persistence.rb

Instance Method Summary collapse

Instance Method Details

#aasm_create_scope(state_machine_name, scope_name) ⇒ Object



42
43
44
45
46
47
# File 'lib/aasm/persistence/no_brainer_persistence.rb', line 42

def aasm_create_scope(state_machine_name, scope_name)
  scope_options = lambda {
    where(aasm(state_machine_name).attribute_name.to_sym => scope_name.to_s)
  }
  send(:scope, scope_name, scope_options)
end