diff --git a/lib/devise.rb b/lib/devise.rb index df9e7899..9b6fb5a5 100644 --- a/lib/devise.rb +++ b/lib/devise.rb @@ -334,7 +334,7 @@ module Devise # def self.add_module(module_name, options = {}) ALL << module_name - options.assert_valid_keys(:strategy, :model, :controller, :route) + options.assert_valid_keys(:strategy, :model, :controller, :route, :no_input) if strategy = options[:strategy] strategy = (strategy == true ? module_name : strategy) @@ -346,7 +346,7 @@ module Devise CONTROLLERS[module_name] = controller end - NO_INPUT << strategy if strategy && controller != :sessions + NO_INPUT << strategy if options[:no_input] if route = options[:route] case route diff --git a/lib/devise/modules.rb b/lib/devise/modules.rb index 810ee1a1..b59f69e9 100644 --- a/lib/devise/modules.rb +++ b/lib/devise/modules.rb @@ -5,8 +5,8 @@ Devise.with_options :model => true do |d| d.with_options :strategy => true do |s| routes = [nil, :new, :destroy] s.add_module :database_authenticatable, :controller => :sessions, :route => { :session => routes } - s.add_module :token_authenticatable, :controller => :sessions, :route => { :session => routes } - s.add_module :rememberable + s.add_module :token_authenticatable, :controller => :sessions, :route => { :session => routes }, :no_input => true + s.add_module :rememberable, :no_input => true end # Other authentications