method

ensure_editor_available

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: Editor
ensure_editor_available(command:) private

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/command/helpers/editor.rb, line 10
          def ensure_editor_available(command))
            if ENV["EDITOR"].to_s.empty?
              say "No $EDITOR to open file in. Assign one like this:"
              say ""
              say %(EDITOR="mate --wait" #{command})
              say ""
              say "For editors that fork and exit immediately, it's important to pass a wait flag,"
              say "otherwise the credentials will be saved immediately with no chance to edit."

              false
            else
              true
            end
          end
Register or log in to add new notes.