Bring mongomapper up to date. Remember that you need mongo_ext in order to use MongoMapper with Devise.
This commit is contained in:
parent
a5b2ee5171
commit
394b1ff444
|
@ -4,6 +4,7 @@
|
|||
* enhancements
|
||||
* Added devise lockable (by github/mhfs)
|
||||
* Warden 0.9.0 compatibility
|
||||
* Mongomapper 0.6.10 compatibility
|
||||
|
||||
== 0.8.2
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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|
|
||||
|
|
|
@ -16,6 +16,5 @@ class ActiveSupport::TestCase
|
|||
setup do
|
||||
User.delete_all
|
||||
Admin.delete_all
|
||||
Account.delete_all
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue