From 53ea701855717a9417f301a2fab748a379b64c27 Mon Sep 17 00:00:00 2001 From: michaltaberski Date: Fri, 16 Dec 2011 16:46:15 +0100 Subject: [PATCH] elseif presistance --- lib/aasm/persistence.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/aasm/persistence.rb b/lib/aasm/persistence.rb index 2a7d4c9..3efe50e 100644 --- a/lib/aasm/persistence.rb +++ b/lib/aasm/persistence.rb @@ -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