Class: AASM::Configuration
- Inherits:
-
Object
- Object
- AASM::Configuration
- Defined in:
- lib/aasm/configuration.rb
Class Attribute Summary collapse
-
.hide_warnings ⇒ Object
Returns the value of attribute hide_warnings.
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.
-
#timestamps ⇒ Object
automatically set ‘“#state_name_at” = ::Time.now` on state changes.
-
#use_transactions ⇒ Object
for ActiveRecord: use transactions.
-
#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.
Class Attribute Details
.hide_warnings ⇒ Object
Returns the value of attribute hide_warnings.
45 46 47 |
# File 'lib/aasm/configuration.rb', line 45 def hide_warnings @hide_warnings end |
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.
36 37 38 |
# File 'lib/aasm/configuration.rb', line 36 def enum @enum end |
#logger ⇒ Object
Configure a logger, with default being a Logger to STDERR
42 43 44 |
# File 'lib/aasm/configuration.rb', line 42 def logger @logger end |
#namespace ⇒ Object
namespace reader methods and constants
39 40 41 |
# File 'lib/aasm/configuration.rb', line 39 def namespace @namespace end |
#no_direct_assignment ⇒ Object
forbid direct assignment in aasm_state column (in ActiveRecord)
31 32 33 |
# File 'lib/aasm/configuration.rb', line 31 def no_direct_assignment @no_direct_assignment end |
#requires_lock ⇒ Object
for ActiveRecord: use pessimistic locking
25 26 27 |
# File 'lib/aasm/configuration.rb', line 25 def requires_lock @requires_lock end |
#requires_new_transaction ⇒ Object
for ActiveRecord: use requires_new for nested transactions?
22 23 24 |
# File 'lib/aasm/configuration.rb', line 22 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 |
#timestamps ⇒ Object
automatically set ‘“#state_name_at” = ::Time.now` on state changes
28 29 30 |
# File 'lib/aasm/configuration.rb', line 28 def @timestamps end |
#use_transactions ⇒ Object
for ActiveRecord: use transactions
19 20 21 |
# File 'lib/aasm/configuration.rb', line 19 def use_transactions @use_transactions 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
34 35 36 |
# File 'lib/aasm/configuration.rb', line 34 def with_klass @with_klass end |