Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix indentation and newlines in generated engine

  • Loading branch information...
commit 34d1e5d04d2e2583bf28fc2365f43d5917e2c648 1 parent 79e6c7d
@drogus drogus authored
View
2  railties/lib/rails/generators/named_base.rb
@@ -42,7 +42,7 @@ def indent(content, multiplier = 2)
end
def wrap_with_namespace(content)
- content = indent(content)
+ content = indent(content).chomp
"module #{namespace.name}\n#{content}\nend\n"
end
View
2  railties/lib/rails/generators/rails/plugin_new/templates/lib/%name%/engine.rb
@@ -1,7 +1,7 @@
module <%= camelized %>
class Engine < Rails::Engine
<% if mountable? -%>
- isolate_namespace <%= camelized %>
+ isolate_namespace <%= camelized %>
<% end -%>
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.