method

ignore_key_file

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: EncryptionKeyFileGenerator
ignore_key_file(key_path, ignore: key_ignore(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 33
      def ignore_key_file(key_path, ignore: key_ignore(key_path))
        if File.exist?(".gitignore")
          unless File.read(".gitignore").include?(ignore)
            log "Ignoring #{key_path} so it won't end up in Git history:"
            log ""
            append_to_file ".gitignore", ignore
            log ""
          end
        else
          log "IMPORTANT: Don't commit #{key_path}. Add this to your ignore file:"
          log ignore, :on_green
          log ""
        end
      end
Register or log in to add new notes.