diff options
author | José Valim <jose.valim@gmail.com> | 2012-04-25 06:15:12 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-04-25 06:15:12 -0700 |
commit | 33d80919ff9549c64ef7fc657d70012fd6e22fb0 (patch) | |
tree | 0ba58ea1dfbac20006647b81246e8c84c8614d62 /railties/lib | |
parent | cd65682835c3fe1cbad8d02f3282c64a24d29b71 (diff) | |
parent | 6ac9e493fb14cf7f9ca426f1ddd077ece6dc581f (diff) | |
download | rails-33d80919ff9549c64ef7fc657d70012fd6e22fb0.tar.gz rails-33d80919ff9549c64ef7fc657d70012fd6e22fb0.tar.bz2 rails-33d80919ff9549c64ef7fc657d70012fd6e22fb0.zip |
Merge pull request #5902 from avakhov/generator-no-indent-blank-lines
Don't indent blank lines in named base generators
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/named_base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb index c457b5fbbc..e85d1b8fa2 100644 --- a/railties/lib/rails/generators/named_base.rb +++ b/railties/lib/rails/generators/named_base.rb @@ -40,7 +40,7 @@ module Rails def indent(content, multiplier = 2) spaces = " " * multiplier - content = content.each_line.map {|line| "#{spaces}#{line}" }.join + content = content.each_line.map {|line| line.blank? ? line : "#{spaces}#{line}" }.join end def wrap_with_namespace(content) |