More tweaks for plugin compatibility.

This commit is contained in:
José Valim 2009-12-08 20:39:38 -02:00
parent 5735b21c77
commit 3de34c3952
4 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,8 @@
== 0.7.1
* enhancements
* Small enhancements for other plugins compatibility (by github.com/grimen)
== 0.7.0
* deprecations

View File

@ -8,9 +8,9 @@ module Devise
# Maps controller names to devise modules
CONTROLLERS = {
:sessions => :authenticatable,
:passwords => :recoverable,
:confirmations => :confirmable
:sessions => [:authenticatable],
:passwords => [:recoverable],
:confirmations => [:confirmable]
}.freeze
STRATEGIES = [:authenticatable]

View File

@ -84,7 +84,7 @@ module Devise
# Check if the respective controller has a module in the mapping class.
def allows?(controller)
self.for.include?(CONTROLLERS[controller.to_sym])
(self.for & CONTROLLERS[controller.to_sym]).present?
end
# Return in which position in the path prefix devise should find the as mapping.

View File

@ -1,3 +1,3 @@
module Devise
VERSION = "0.7.0".freeze
VERSION = "0.7.1".freeze
end