diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-06 19:21:09 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-06 19:21:09 +0000 |
commit | 4a44dbb63d224125380fd2ea5d9c1dc76f885681 (patch) | |
tree | eff9af032fa5b73cbdaa5ca707205a1dc0195af8 | |
parent | 96fa4a2f52c55e97eb638cc35a9fe35c3efc062e (diff) | |
download | rails-4a44dbb63d224125380fd2ea5d9c1dc76f885681.tar.gz rails-4a44dbb63d224125380fd2ea5d9c1dc76f885681.tar.bz2 rails-4a44dbb63d224125380fd2ea5d9c1dc76f885681.zip |
Make work with --skip-timestamps
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8098 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/lib/rails_generator/generators/components/model/templates/fixtures.yml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml b/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml index c58dd85b00..c8a124f44f 100644 --- a/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +++ b/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 -%> |