Permalink
Browse files

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

…(Closes #3563)
  • Loading branch information...
1 parent e6cadd4 commit 8bb3b9bcffae0675fcf3cd2d05870de03aa31397 @dhh dhh committed Dec 18, 2009
Showing with 9 additions and 5 deletions.
  1. +9 −5 railties/lib/rails_generator/generators/components/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 8bb3b9b

Please sign in to comment.