diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-01 20:51:54 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-01 20:51:54 +0000 |
commit | cc86875a14dda3dfb405d609ce031bea93f090b3 (patch) | |
tree | 80dfa0013ac92d48f00f32f457071f761734a1b6 /railties/lib/rails_generator/generators/components/model/templates/fixtures.yml | |
parent | c0d1f035fb57d8d04d39458ee7a74725212a6190 (diff) | |
download | rails-cc86875a14dda3dfb405d609ce031bea93f090b3.tar.gz rails-cc86875a14dda3dfb405d609ce031bea93f090b3.tar.bz2 rails-cc86875a14dda3dfb405d609ce031bea93f090b3.zip |
Generated fixtures should not specify ids since theyre expected to be foxy fixtures (closes #10330) [jbarnette]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8247 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/model/templates/fixtures.yml')
-rw-r--r-- | railties/lib/rails_generator/generators/components/model/templates/fixtures.yml | 18 |
1 files changed, 9 insertions, 9 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 c8a124f44f..c21035113e 100644 --- a/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +++ b/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml @@ -1,19 +1,19 @@ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html + +<% unless attributes.empty? -%> one: - <%= class_name.constantize.primary_key %>: 1 <% 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) %> +<% else -%> +# one: +# column: value +# +# two: +# column: value <% end -%> |