Permalink
Browse files

Models with no attributes should just have empty hash fixtures [Sam] (C…

…loses #3563)
  • Loading branch information...
dhh committed Dec 18, 2009
1 parent fa57597 commit 44fb54fecdab684425bbc3bb15aac9d5c6e34fc8
Showing with 9 additions and 5 deletions.
  1. +9 −5 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 -%>

0 comments on commit 44fb54f

Please sign in to comment.