diff options
Diffstat (limited to 'railties/lib/rails/generators/test_unit')
-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 |