Permalink
Browse files

Make work with --skip-timestamps

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8098 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 96fa4a2 commit 4a44dbb63d224125380fd2ea5d9c1dc76f885681 @dhh dhh committed Nov 6, 2007
Showing with 4 additions and 0 deletions.
  1. +4 −0 railties/lib/rails_generator/generators/components/model/templates/fixtures.yml
@@ -4,12 +4,16 @@ one:
<% for attribute in attributes -%>
<%= attribute.name %>: <%= attribute.default %>
<% end -%>
+<% unless options[:skip_timestamps] -%>
created_at: <%= Time.now.to_s(:db) %>
updated_at: <%= Time.now.to_s(:db) %>
+<% end -%>
two:
<%= class_name.constantize.primary_key %>: 2
<% for attribute in attributes -%>
<%= attribute.name %>: <%= attribute.default %>
<% end -%>
+<% unless options[:skip_timestamps] -%>
created_at: <%= Time.now.to_s(:db) %>
updated_at: <%= Time.now.to_s(:db) %>
+<% end -%>

0 comments on commit 4a44dbb

Please sign in to comment.