1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Bring mongomapper up to date. Remember that you need mongo_ext in order to use MongoMapper with Devise.

This commit is contained in:
José Valim 2010-01-16 11:22:09 +01:00
parent a5b2ee5171
commit 394b1ff444
5 changed files with 16 additions and 4 deletions

View file

@ -4,6 +4,7 @@
* enhancements
* Added devise lockable (by github/mhfs)
* Warden 0.9.0 compatibility
* Mongomapper 0.6.10 compatibility
== 0.8.2

View file

@ -54,7 +54,8 @@ Devise.setup do |config|
# config.unlock_in = 1.hour
# ==> General configuration
# Load and configure the ORM. Supports :active_record, :data_mapper and :mongo_mapper.
# Load and configure the ORM. Supports :active_record (default), :mongo_mapper
# (requires mongo_ext installed) and :data_mapper (experimental).
# require 'devise/orm/mongo_mapper'
# config.orm = :mongo_mapper

View file

@ -1,8 +1,19 @@
module Devise
module Orm
module MongoMapper
module InstanceMethods
def save(options={})
if options == false
super(:validate => false)
else
super
end
end
end
def self.included_modules_hook(klass, modules)
klass.send :extend, self
klass.send :include, InstanceMethods
yield
modules.each do |mod|

View file

@ -16,6 +16,5 @@ class ActiveSupport::TestCase
setup do
User.delete_all
Admin.delete_all
Account.delete_all
end
end