提交 f0f978a4 编写于 作者: P Piotr Sarnacki 提交者: Vijay Dev

Fix indentation and newlines in generated engine

上级 63480d23
...@@ -42,7 +42,7 @@ def indent(content, multiplier = 2) ...@@ -42,7 +42,7 @@ def indent(content, multiplier = 2)
end end
def wrap_with_namespace(content) def wrap_with_namespace(content)
content = indent(content) content = indent(content).chomp
"module #{namespace.name}\n#{content}\nend\n" "module #{namespace.name}\n#{content}\nend\n"
end end
......
module <%= camelized %> module <%= camelized %>
class Engine < Rails::Engine class Engine < Rails::Engine
<% if mountable? -%> <% if mountable? -%>
isolate_namespace <%= camelized %> isolate_namespace <%= camelized %>
<% end -%> <% end -%>
end end
end end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册