Read the secret_key value from Rails secret_key_base.

It is possible to override this by setting the `secret_key` manually
on the `devise.rb` initializer on your application.
This commit is contained in:
Lucas Mazza
2014-01-13 21:24:21 -02:00
parent d5e0171cb4
commit eba91e6580
4 changed files with 21 additions and 1 deletions

View File

@@ -4,7 +4,11 @@ Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
<% if rails_4? -%>
# config.secret_key = '<%= SecureRandom.hex(64) %>'
<% else -%>
config.secret_key = '<%= SecureRandom.hex(64) %>'
<% end -%>
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,