From 44fb54fecdab684425bbc3bb15aac9d5c6e34fc8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 17 Dec 2009 17:53:16 -0800 Subject: Models with no attributes should just have empty hash fixtures [Sam] (Closes #3563) --- .../generators/test_unit/model/templates/fixtures.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'railties') 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 c21035113e..a30132bc99 100644 --- a/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml +++ b/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml @@ -11,9 +11,13 @@ two: <%= attribute.name %>: <%= attribute.default %> <% end -%> <% else -%> -# one: -# column: value +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below # -# two: -# column: value -<% end -%> +one: {} +# column: value +# +two: {} +# column: value +<% end -%> \ No newline at end of file -- cgit v1.2.3