Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed MongoMapper adapter in order to get it working with versions >=…

… 0.8.0

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit a41025e421c2727a8c4098092515e4da8c17c3ca 1 parent 73e5d84
Iván Valdés ivanvc authored josevalim committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/devise/orm/mongo_mapper.rb
9 lib/devise/orm/mongo_mapper.rb
View
@@ -43,5 +43,10 @@ def apply_schema(name, type, options={})
end
end
-MongoMapper::Plugins::Document::ClassMethods.send(:include, Devise::Models)
-MongoMapper::Plugins::EmbeddedDocument::ClassMethods.send(:include, Devise::Models)
+if MongoMapper::Version >= "0.8.0"
+ MongoMapper::Plugins::Document::ClassMethods.send(:include, Devise::Models)
+ MongoMapper::Plugins::EmbeddedDocument::ClassMethods.send(:include, Devise::Models)
+else
+ MongoMapper::Document::ClassMethods.send(:include, Devise::Models)
+ MongoMapper::EmbeddedDocument::ClassMethods.send(:include, Devise::Models)
+end
Please sign in to comment.
Something went wrong with that request. Please try again.