Permalink
Browse files

More tweaks for plugin compatibility.

  • Loading branch information...
1 parent 5735b21 commit 3de34c3952106488c79eb8720043dd25def2a3e8 @josevalim josevalim committed Dec 8, 2009
Showing with 10 additions and 5 deletions.
  1. +5 −0 CHANGELOG.rdoc
  2. +3 −3 lib/devise.rb
  3. +1 −1 lib/devise/mapping.rb
  4. +1 −1 lib/devise/version.rb
View
@@ -1,3 +1,8 @@
+== 0.7.1
+
+* enhancements
+ * Small enhancements for other plugins compatibility (by github.com/grimen)
+
== 0.7.0
* deprecations
View
@@ -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
@@ -84,7 +84,7 @@ def to
# 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
@@ -1,3 +1,3 @@
module Devise
- VERSION = "0.7.0".freeze
+ VERSION = "0.7.1".freeze
end

2 comments on commit 3de34c3

Contributor

grimen replied Dec 8, 2009

Devise::CONTROLLERS should be unfreezed as well right?

Owner

josevalim replied Dec 9, 2009

Yeah! But you still can modify the arrays as values. So it won't block you.

Please sign in to comment.