Module: AASM::Persistence::MongoidPersistence::ClassMethods
- Defined in:
- lib/aasm/persistence/mongoid_persistence.rb
Instance Method Summary collapse
-
#aasm_column(column_name = nil) ⇒ Object
Maps to the aasm_column in the database.
Instance Method Details
#aasm_column(column_name = nil) ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/aasm/persistence/mongoid_persistence.rb', line 80 def aasm_column(column_name=nil) if column_name AASM::StateMachine[self].config.column = column_name.to_sym # @aasm_column = column_name.to_sym else AASM::StateMachine[self].config.column ||= :aasm_state # @aasm_column ||= :aasm_state end # @aasm_column AASM::StateMachine[self].config.column end |