method

generate_local_secret

rails latest stable - Class: Rails::Application::Configuration

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

generate_local_secret()
private

No documentation available.

# File railties/lib/rails/application/configuration.rb, line 631
        def generate_local_secret
          key_file = root.join("tmp/local_secret.txt")

          unless File.exist?(key_file)
            random_key = SecureRandom.hex(64)
            FileUtils.mkdir_p(key_file.dirname)
            File.binwrite(key_file, random_key)
          end

          File.binread(key_file)
        end