method
secret_key_base=
rails latest stable - Class:
Rails::Application::Configuration
secret_key_base=(new_secret_key_base)public
No documentation available.
# File railties/lib/rails/application/configuration.rb, line 513
def secret_key_base=(new_secret_key_base)
if new_secret_key_base.nil? && Rails.env.local?
@secret_key_base = generate_local_secret
elsif new_secret_key_base.is_a?(String) && new_secret_key_base.present?
@secret_key_base = new_secret_key_base
elsif new_secret_key_base
raise ArgumentError, "`secret_key_base` for #{Rails.env} environment must be a type of String`"
else
raise ArgumentError, "Missing `secret_key_base` for '#{Rails.env}' environment, set this string with `bin/rails credentials:edit`"
end
end