instance method
ignore_key_file
Ruby on Rails 5.1.7
Since v5.1.7 Last seen in v5.1.7Signature
ignore_key_file()
No documentation comment.
Source
# 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
Defined in railties/lib/rails/generators/rails/encrypted_secrets/encrypted_secrets_generator.rb line 23
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::EncryptedSecretsGenerator