mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
elseif presistance
This commit is contained in:
parent
1359605755
commit
53ea701855
1 changed files with 3 additions and 0 deletions
|
@ -9,6 +9,9 @@ module AASM
|
|||
if hierarchy.include?("ActiveRecord::Base")
|
||||
require File.join(File.dirname(__FILE__), 'persistence', 'active_record_persistence')
|
||||
base.send(:include, AASM::Persistence::ActiveRecordPersistence)
|
||||
elsif hierarchy.include?("Mongoid::Document")
|
||||
require File.join(File.dirname(__FILE__), 'persistence', 'mongoid_persistence')
|
||||
base.send(:include, AASM::Persistence::MongoidPersistence)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue