Skip to content
This repository
Browse code

Fixed the placement of fixture files for nested models when generatin…

…g through script/generate model (closes #7547) [jkit]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7573 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 1d4002d462a89ee08e3523f1f08d40b7192d4352 1 parent 7573791
David Heinemeier Hansson authored September 22, 2007
2  railties/CHANGELOG
... ...
@@ -1,5 +1,7 @@
1 1
 *SVN*
2 2
 
  3
+* Fixed the placement of fixture files for nested models when generating through script/generate model #7547 [jkit]
  4
+
3 5
 * Added TEMPLATE option to rake doc:app to set a custom output template #7737 [Jakob S]
4 6
 
5 7
 * Added VERBOSE option to rake db:migrate to turn off output #8204 [jbarnette]
2  railties/lib/rails_generator/generators/components/model/model_generator.rb
@@ -14,7 +14,7 @@ def manifest
14 14
       # Model class, unit test, and fixtures.
15 15
       m.template 'model.rb',      File.join('app/models', class_path, "#{file_name}.rb")
16 16
       m.template 'unit_test.rb',  File.join('test/unit', class_path, "#{file_name}_test.rb")
17  
-      m.template 'fixtures.yml',  File.join('test/fixtures', class_path, "#{table_name}.yml")
  17
+      m.template 'fixtures.yml',  File.join('test/fixtures', "#{table_name}.yml")
18 18
 
19 19
       unless options[:skip_migration]
20 20
         m.migration_template 'migration.rb', 'db/migrate', :assigns => {

0 notes on commit 1d4002d

Please sign in to comment.
Something went wrong with that request. Please try again.