instance method add_encrypted_secrets_file

Ruby on Rails 5.1.7

Since v5.1.7 Last seen in v5.1.7

Signature

add_encrypted_secrets_file()

No documentation comment.

Source
# File railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb, line 38
      def add_encrypted_secrets_file
        unless (defined?(@@skip_secrets_file) && @@skip_secrets_file) || File.exist?("config/secrets.yml.enc")
          say "Adding config/secrets.yml.enc to store secrets that needs to be encrypted."
          say ""
          say "For now the file contains this but it's been encrypted with the generated key:"
          say ""
          say Secrets.template, :on_green
          say ""

          Secrets.write(Secrets.template)

          say "You can edit encrypted secrets with `bin/rails secrets:edit`."
          say ""
        end

        say "Add this to your config/environments/production.rb:"
        say "config.read_encrypted_secrets = true"
      end

Defined in railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb line 38 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Generators::EncryptedSecretsGenerator

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