1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Inline the lone add_master_key_file_silently use.

This commit is contained in:
Kasper Timm Hansen 2017-09-14 20:38:24 +02:00
parent 9fa883143a
commit 31a8e7c626
No known key found for this signature in database
GPG key ID: 191153215EDA53D8

View file

@ -20,17 +20,13 @@ module Rails
say "If you lose the key, no one, including you, can access anything encrypted with it."
say ""
add_master_key_file_silently key
create_file MASTER_KEY_PATH, key
say ""
ignore_master_key_file
end
end
def add_master_key_file_silently(key = nil)
create_file MASTER_KEY_PATH, key || ActiveSupport::EncryptedFile.generate_key
end
private
def ignore_master_key_file
if File.exist?(".gitignore")