Browse files

Fix indentation and newlines in generated engine

  • Loading branch information...
1 parent 79e6c7d commit 34d1e5d04d2e2583bf28fc2365f43d5917e2c648 @drogus drogus committed Dec 13, 2010
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

0 comments on commit 34d1e5d

Please sign in to comment.