Permalink
Browse files

Moved the authentication_keys configuration to the devise model, rath…

…er than as a global config
  • Loading branch information...
1 parent 002dd06 commit d66098af6aaa2fb25828d07e01d01997e85b901f @senior committed Aug 30, 2011
@@ -11,7 +11,7 @@ class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable, :lockable and :timeoutable
if self.respond_to?(:devise)
- devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
+ devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :authentication_keys => [:login]
end
# Setup accessible (or protected) attributes for your model
@@ -22,7 +22,7 @@
# authenticating an user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
- config.authentication_keys = [ :login ]
+ # config.authentication_keys = [ :login ]
# Tell if authentication through request.params is enabled. True by default.
# config.params_authenticatable = true
@@ -22,7 +22,7 @@
# authenticating an user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
- config.authentication_keys = [ :login ]
+ # config.authentication_keys = [ :login ]
# Tell if authentication through request.params is enabled. True by default.
# config.params_authenticatable = true

0 comments on commit d66098a

Please sign in to comment.