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
|
* enhancements
|
||||||
* Added devise lockable (by github/mhfs)
|
* Added devise lockable (by github/mhfs)
|
||||||
* Warden 0.9.0 compatibility
|
* Warden 0.9.0 compatibility
|
||||||
|
* Mongomapper 0.6.10 compatibility
|
||||||
|
|
||||||
== 0.8.2
|
== 0.8.2
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,8 @@ Devise.setup do |config|
|
||||||
# config.unlock_in = 1.hour
|
# config.unlock_in = 1.hour
|
||||||
|
|
||||||
# ==> General configuration
|
# ==> 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'
|
# require 'devise/orm/mongo_mapper'
|
||||||
# config.orm = :mongo_mapper
|
# config.orm = :mongo_mapper
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ module Devise
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.included_modules_hook(klass, modules)
|
def self.included_modules_hook(klass, modules)
|
||||||
klass.send :extend, self
|
klass.send :extend, self
|
||||||
klass.send :include, InstanceMethods
|
klass.send :include, InstanceMethods
|
||||||
|
|
||||||
yield
|
yield
|
||||||
|
|
|
@ -1,8 +1,19 @@
|
||||||
module Devise
|
module Devise
|
||||||
module Orm
|
module Orm
|
||||||
module MongoMapper
|
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)
|
def self.included_modules_hook(klass, modules)
|
||||||
klass.send :extend, self
|
klass.send :extend, self
|
||||||
|
klass.send :include, InstanceMethods
|
||||||
yield
|
yield
|
||||||
|
|
||||||
modules.each do |mod|
|
modules.each do |mod|
|
||||||
|
|
|
@ -16,6 +16,5 @@ class ActiveSupport::TestCase
|
||||||
setup do
|
setup do
|
||||||
User.delete_all
|
User.delete_all
|
||||||
Admin.delete_all
|
Admin.delete_all
|
||||||
Account.delete_all
|
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue