From 258eb1c7e65a11a26bea988ade421fdb15f6799f Mon Sep 17 00:00:00 2001 From: Jo Liss Date: Wed, 12 Jan 2011 01:45:18 +0800 Subject: [PATCH] Move config.pepper from encryptable into database_authenticatable section in the initializer. config.pepper is used by both database_authenticatable and encryptable, but encryptable requires database_authenticatable anyway, so it makes more sense to have it in the database_authenticatable section. --- lib/generators/templates/devise.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/generators/templates/devise.rb b/lib/generators/templates/devise.rb index 10170933..7101cf0a 100644 --- a/lib/generators/templates/devise.rb +++ b/lib/generators/templates/devise.rb @@ -53,6 +53,9 @@ Devise.setup do |config| # using other encryptors, it sets how many times you want the password re-encrypted. config.stretches = 10 + # Setup a pepper to generate the encrypted password. + # config.pepper = <%= ActiveSupport::SecureRandom.hex(64).inspect %> + # ==> Configuration for :confirmable # The time you want to give your user to confirm his account. During this time # he will be able to access your application without confirming. Default is 0.days @@ -124,9 +127,6 @@ Devise.setup do |config| # REST_AUTH_SITE_KEY to pepper) # config.encryptor = :sha512 - # Setup a pepper to generate the encrypted password. - # config.pepper = <%= ActiveSupport::SecureRandom.hex(64).inspect %> - # ==> Configuration for :token_authenticatable # Defines name of the authentication token params key # config.token_authentication_key = :auth_token