Module: AASM::Persistence::ActiveRecordPersistence::NamedScopeMethods

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

Instance Method Summary collapse

Instance Method Details

#aasm_state_with_named_scope(name, options = {}) ⇒ Object



241
242
243
244
# File 'lib/aasm/persistence/active_record_persistence.rb', line 241

def aasm_state_with_named_scope name, options = {}
  aasm_state_without_named_scope name, options
  self.named_scope name, :conditions => { "#{table_name}.#{self.aasm_column}" => name.to_s} unless self.respond_to?(name)
end