Permalink
Browse files

elseif presistance

  • Loading branch information...
1 parent 1359605 commit 53ea701855717a9417f301a2fab748a379b64c27 michaltaberski committed Dec 16, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/aasm/persistence.rb
View
@@ -9,6 +9,9 @@ def self.set_persistence(base)
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

0 comments on commit 53ea701

Please sign in to comment.