diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-12-13 01:28:27 +0100 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2010-12-16 01:49:29 +0530 |
commit | f0f978a4f31930777d402965cad55086ebaa46ba (patch) | |
tree | 301b383866e9e20b229e052b40c1933f7dd55bc0 /railties/lib/rails/generators | |
parent | 63480d234df401d678bb7c5a8cef662e3222d841 (diff) | |
download | rails-f0f978a4f31930777d402965cad55086ebaa46ba.tar.gz rails-f0f978a4f31930777d402965cad55086ebaa46ba.tar.bz2 rails-f0f978a4f31930777d402965cad55086ebaa46ba.zip |
Fix indentation and newlines in generated engine
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/named_base.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/plugin_new/templates/lib/%name%/engine.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb index e0dde4360f..44a2639488 100644 --- a/railties/lib/rails/generators/named_base.rb +++ b/railties/lib/rails/generators/named_base.rb @@ -42,7 +42,7 @@ module Rails end def wrap_with_namespace(content) - content = indent(content) + content = indent(content).chomp "module #{namespace.name}\n#{content}\nend\n" end diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/lib/%name%/engine.rb b/railties/lib/rails/generators/rails/plugin_new/templates/lib/%name%/engine.rb index 9600ee0c3f..aa8ea77bae 100644 --- a/railties/lib/rails/generators/rails/plugin_new/templates/lib/%name%/engine.rb +++ b/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 |