Skip to content

Commit

Permalink
keep it simple
Browse files Browse the repository at this point in the history
  • Loading branch information
alto committed Apr 24, 2013
1 parent 044e84b commit 52181d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/aasm/persistence/active_record_persistence.rb
Expand Up @@ -32,7 +32,6 @@ module ActiveRecordPersistence
#
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)
Expand Down
4 changes: 4 additions & 0 deletions lib/aasm/persistence/base.rb
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion lib/aasm/persistence/mongoid_persistence.rb
Expand Up @@ -34,7 +34,6 @@ module MongoidPersistence
#
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)
Expand Down

0 comments on commit 52181d8

Please sign in to comment.