instance method
generate_development_secret
Ruby on Rails 6.1.7.10
Since v5.2.8.1 Last seen in v7.0.10 Private — implementation detail, not part of the public APISignature
generate_development_secret()
No documentation comment.
Source
# File railties/lib/rails/application.rb, line 608
def generate_development_secret
if secrets.secret_key_base.nil?
key_file = Rails.root.join("tmp/development_secret.txt")
if !File.exist?(key_file)
random_key = SecureRandom.hex(64)
FileUtils.mkdir_p(key_file.dirname)
File.binwrite(key_file, random_key)
end
secrets.secret_key_base = File.binread(key_file)
end
secrets.secret_key_base
end
Defined in railties/lib/rails/application.rb line 608
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Application