diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-10 23:16:48 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-10 23:16:48 -0300 |
commit | 8dac9768b16c6cfaffa6c84abaaa7c4926020e0b (patch) | |
tree | c8d3b7d22a98dcb863d286aac88540d02e341fb1 /railties/lib | |
parent | d668544785550712677ae999dfb0644e640ec729 (diff) | |
download | rails-8dac9768b16c6cfaffa6c84abaaa7c4926020e0b.tar.gz rails-8dac9768b16c6cfaffa6c84abaaa7c4926020e0b.tar.bz2 rails-8dac9768b16c6cfaffa6c84abaaa7c4926020e0b.zip |
Make sure that no extra spaces are created with a non-polymorphic
attributes
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/test_unit/model/templates/fixtures.yml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml b/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml index b2bcaf63be..7625ff975c 100644 --- a/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml +++ b/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml @@ -4,13 +4,17 @@ one: <% attributes.each do |attribute| -%> <%= attribute.column_name %>: <%= attribute.default %> - <%= "#{attribute.name}_type: #{attribute.human_name}" if attribute.polymorphic? %> + <%- if attribute.polymorphic? -%> + <%= "#{attribute.name}_type: #{attribute.human_name}" %> + <%- end -%> <% end -%> two: <% attributes.each do |attribute| -%> <%= attribute.column_name %>: <%= attribute.default %> - <%= "#{attribute.name}_type: #{attribute.human_name}" if attribute.polymorphic? %> + <%- if attribute.polymorphic? -%> + <%= "#{attribute.name}_type: #{attribute.human_name}" %> + <%- end -%> <% end -%> <% else -%> # This model initially had no columns defined. If you add columns to the |