mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
keep it simple
This commit is contained in:
parent
044e84b181
commit
52181d8017
3 changed files with 4 additions and 2 deletions
|
@ -32,7 +32,6 @@ module AASM
|
|||
#
|
||||
def self.included(base)
|
||||
base.send(:include, AASM::Persistence::Base)
|
||||
base.extend AASM::Persistence::Base::ClassMethods
|
||||
base.extend AASM::Persistence::ActiveRecordPersistence::ClassMethods
|
||||
base.send(:include, AASM::Persistence::ActiveRecordPersistence::InstanceMethods)
|
||||
base.send(:include, AASM::Persistence::ActiveRecordPersistence::WriteState) unless base.method_defined?(:aasm_write_state)
|
||||
|
|
|
@ -2,6 +2,10 @@ module AASM
|
|||
module Persistence
|
||||
module Base
|
||||
|
||||
def self.included(base) #:nodoc:
|
||||
base.extend ClassMethods
|
||||
end
|
||||
|
||||
# Returns the value of the aasm_column - called from <tt>aasm.current_state</tt>
|
||||
#
|
||||
# If it's a new record, and the aasm state column is blank it returns the initial state
|
||||
|
|
|
@ -34,7 +34,6 @@ module AASM
|
|||
#
|
||||
def self.included(base)
|
||||
base.send(:include, AASM::Persistence::Base)
|
||||
base.extend AASM::Persistence::Base::ClassMethods
|
||||
base.extend AASM::Persistence::MongoidPersistence::ClassMethods
|
||||
base.send(:include, AASM::Persistence::MongoidPersistence::InstanceMethods)
|
||||
base.send(:include, AASM::Persistence::MongoidPersistence::WriteState) unless base.method_defined?(:aasm_write_state)
|
||||
|
|
Loading…
Reference in a new issue