instance method ensure_editor_available

Ruby on Rails 5.2.8.1

Since v5.2.8.1 Last seen in v7.0.10 Private

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10

Signature

ensure_editor_available(command:)

No documentation comment.

Parameters

command keyreq
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

Defined in railties/lib/rails/command/helpers/editor.rb line 10 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Command::Helpers::Editor

Type at least 2 characters to search.

↑↓ navigate · open · esc close