instance method generate_development_secret

Ruby on Rails 5.2.8.1

Since v5.2.8.1 Last seen in v7.0.10 Private — implementation detail, not part of the public API

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10

Signature

generate_development_secret()

No documentation comment.

Source
# File railties/lib/rails/application.rb, line 591
      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 591 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Application

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close