Trim new lines in USAGE ERB tags

The USAGE file uses ERB tags for conditionals.
The ERB tags should not output new lines.
Adding the trim_mode option removes the new lines.
This commit is contained in:
Petrik 2021-02-13 17:34:58 +01:00
parent 5585c375d1
commit 0da45ed096
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ module Rails
if usage
super
else
@desc ||= ERB.new(File.read(usage_path)).result(binding) if usage_path
@desc ||= ERB.new(File.read(usage_path), trim_mode: "-").result(binding) if usage_path
end
end

View File

@ -6,10 +6,10 @@ The most common rails commands are:
test:system Run system tests
dbconsole Start a console for the database specified in config/database.yml
(short-cut alias: "db")
<% unless engine? %>
<% unless engine? -%>
new Create a new Rails application. "rails new my_app" creates a
new application called MyApp in "./my_app"
<% end %>
<% end -%>
All commands can be run with -h (or --help) for more information.
In addition to those commands, there are: