Class: AASM::Configuration
- Inherits:
-
Object
- Object
- AASM::Configuration
- Defined in:
- lib/aasm/configuration.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
for all persistence layers: which database column to use?.
-
#create_scopes ⇒ Object
for all persistence layers: create named scopes for each state.
-
#enum ⇒ Object
Returns the value of attribute enum.
-
#logger ⇒ Object
Configure a logger, with default being a Logger to STDERR.
-
#namespace ⇒ Object
namespace reader methods and constants.
-
#no_direct_assignment ⇒ Object
forbid direct assignment in aasm_state column (in ActiveRecord).
-
#requires_lock ⇒ Object
for ActiveRecord: use pessimistic locking.
-
#requires_new_transaction ⇒ Object
for ActiveRecord: use requires_new for nested transactions?.
-
#skip_validation_on_save ⇒ Object
for ActiveRecord: store the new state even if the model is invalid and return true.
-
#whiny_persistence ⇒ Object
for ActiveRecord: when the model is invalid, true -> raise, false -> return false.
-
#whiny_transitions ⇒ Object
let’s cry if the transition is invalid.
-
#with_klass ⇒ Object
allow a AASM::Base sub-class to be used for state machine.
Instance Attribute Details
#column ⇒ Object
for all persistence layers: which database column to use?
4 5 6 |
# File 'lib/aasm/configuration.rb', line 4 def column @column end |
#create_scopes ⇒ Object
for all persistence layers: create named scopes for each state
10 11 12 |
# File 'lib/aasm/configuration.rb', line 10 def create_scopes @create_scopes end |
#enum ⇒ Object
Returns the value of attribute enum.
30 31 32 |
# File 'lib/aasm/configuration.rb', line 30 def enum @enum end |
#logger ⇒ Object
Configure a logger, with default being a Logger to STDERR
36 37 38 |
# File 'lib/aasm/configuration.rb', line 36 def logger @logger end |
#namespace ⇒ Object
namespace reader methods and constants
33 34 35 |
# File 'lib/aasm/configuration.rb', line 33 def namespace @namespace end |
#no_direct_assignment ⇒ Object
forbid direct assignment in aasm_state column (in ActiveRecord)
25 26 27 |
# File 'lib/aasm/configuration.rb', line 25 def no_direct_assignment @no_direct_assignment end |
#requires_lock ⇒ Object
for ActiveRecord: use pessimistic locking
22 23 24 |
# File 'lib/aasm/configuration.rb', line 22 def requires_lock @requires_lock end |
#requires_new_transaction ⇒ Object
for ActiveRecord: use requires_new for nested transactions?
19 20 21 |
# File 'lib/aasm/configuration.rb', line 19 def requires_new_transaction @requires_new_transaction end |
#skip_validation_on_save ⇒ Object
for ActiveRecord: store the new state even if the model is invalid and return true
16 17 18 |
# File 'lib/aasm/configuration.rb', line 16 def skip_validation_on_save @skip_validation_on_save end |
#whiny_persistence ⇒ Object
for ActiveRecord: when the model is invalid, true -> raise, false -> return false
13 14 15 |
# File 'lib/aasm/configuration.rb', line 13 def whiny_persistence @whiny_persistence end |
#whiny_transitions ⇒ Object
let’s cry if the transition is invalid
7 8 9 |
# File 'lib/aasm/configuration.rb', line 7 def whiny_transitions @whiny_transitions end |
#with_klass ⇒ Object
allow a AASM::Base sub-class to be used for state machine
28 29 30 |
# File 'lib/aasm/configuration.rb', line 28 def with_klass @with_klass end |