method

add_key_file

Importance_0
v6.1.3.1 - Show latest stable - 0 notes - Class: EncryptionKeyFileGenerator
add_key_file(key_path) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb, line 10
      def add_key_file(key_path)
        key_path = Pathname.new(key_path)

        unless key_path.exist?
          key = ActiveSupport::EncryptedFile.generate_key

          log "Adding #{key_path} to store the encryption key: #{key}"
          log ""
          log "Save this in a password manager your team can access."
          log ""
          log "If you lose the key, no one, including you, can access anything encrypted with it."

          log ""
          add_key_file_silently(key_path, key)
          log ""
        end
      end
Register or log in to add new notes.