Sha256: 65e7f01ae4bae382d4f149a7adf42f41d7f81676877cf7b79df024fa6ab00788

Contents?: true

Size: 1.28 KB

Versions: 12

Compression:

Stored size: 1.28 KB

Contents

module AASM
  class Configuration
    # for all persistence layers: which database column to use?
    attr_accessor :column

    # let's cry if the transition is invalid
    attr_accessor :whiny_transitions

    # for all persistence layers: create named scopes for each state
    attr_accessor :create_scopes

    # for ActiveRecord: when the model is invalid, true -> raise, false -> return false
    attr_accessor :whiny_persistence

    # for ActiveRecord: store the new state even if the model is invalid and return true
    attr_accessor :skip_validation_on_save

    # for ActiveRecord: use transactions
    attr_accessor :use_transactions

    # for ActiveRecord: use requires_new for nested transactions?
    attr_accessor :requires_new_transaction

    # for ActiveRecord: use pessimistic locking
    attr_accessor :requires_lock

    # forbid direct assignment in aasm_state column (in ActiveRecord)
    attr_accessor :no_direct_assignment

    # allow a AASM::Base sub-class to be used for state machine
    attr_accessor :with_klass

    attr_accessor :enum

    # namespace reader methods and constants
    attr_accessor :namespace

    # Configure a logger, with default being a Logger to STDERR
    attr_accessor :logger

    class << self
      attr_accessor :hide_warnings
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
aasm-5.1.1 lib/aasm/configuration.rb
aasm-5.1.0 lib/aasm/configuration.rb
aasm-5.0.8 lib/aasm/configuration.rb
aasm-5.0.7 lib/aasm/configuration.rb
aasm-5.0.6 lib/aasm/configuration.rb
aasm-5.0.5 lib/aasm/configuration.rb
aasm-5.0.4 lib/aasm/configuration.rb
aasm-5.0.3 lib/aasm/configuration.rb
aasm-5.0.2 lib/aasm/configuration.rb
aasm-5.0.1 lib/aasm/configuration.rb
aasm-5.0.0 lib/aasm/configuration.rb
aasm-4.12.3 lib/aasm/configuration.rb