Permalink
Browse files

Clean up devise_controller? related code.

  • Loading branch information...
1 parent a0eff85 commit 4b47c3ab73faa6e27d89ce5259b64db4bb04f5ad @josevalim josevalim committed Feb 15, 2012
Showing with 3 additions and 8 deletions.
  1. +1 −6 app/controllers/devise_controller.rb
  2. +2 −2 lib/devise/controllers/helpers.rb
@@ -5,7 +5,7 @@ class DeviseController < Devise.parent_controller.constantize
helper DeviseHelper
helpers = %w(resource scope_name resource_name signed_in_resource
- resource_class devise_mapping devise_controller?)
+ resource_class devise_mapping)
hide_action *helpers
helper_method *helpers
@@ -38,11 +38,6 @@ def devise_mapping
@devise_mapping ||= request.env["devise.mapping"]
end
- # Overwrites devise_controller? to return true
- def devise_controller?
- true
- end
-
protected
# Checks whether it's a devise mapped resource or not.
@@ -75,9 +75,9 @@ def warden
# the controllers defined inside devise. Useful if you want to apply a before
# filter to all controllers, except the ones in devise:
#
- # before_filter :my_filter, :unless => { |c| c.devise_controller? }
+ # before_filter :my_filter, :unless => :devise_controller?
def devise_controller?
- false
+ is_a?(DeviseController)
end
# Tell warden that params authentication is allowed for that specific page.

0 comments on commit 4b47c3a

Please sign in to comment.