method

ignore_key_file

rails latest stable - Class: Rails::Generators::EncryptedSecretsGenerator

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

ignore_key_file()
public

No documentation available.

# File railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb, line 23
      def ignore_key_file
        if File.exist?(".gitignore")
          unless File.read(".gitignore").include?(key_ignore)
            say "Ignoring config/secrets.yml.key so it won't end up in Git history:"
            say ""
            append_to_file ".gitignore", key_ignore
            say ""
          end
        else
          say "IMPORTANT: Don't commit config/secrets.yml.key. Add this to your ignore file:"
          say key_ignore, :on_green
          say ""
        end
      end