Fixed the placement of fixture files for nested models when generating through script/generate model (closes #7547) [jkit]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7573 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson
2007-09-22 22:10:49 +00:00
parent 7573791284
commit 1d4002d462
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* Fixed the placement of fixture files for nested models when generating through script/generate model #7547 [jkit]
* Added TEMPLATE option to rake doc:app to set a custom output template #7737 [Jakob S]
* Added VERBOSE option to rake db:migrate to turn off output #8204 [jbarnette]

View File

@@ -14,7 +14,7 @@ class ModelGenerator < Rails::Generator::NamedBase
# Model class, unit test, and fixtures.
m.template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb")
m.template 'unit_test.rb', File.join('test/unit', class_path, "#{file_name}_test.rb")
m.template 'fixtures.yml', File.join('test/fixtures', class_path, "#{table_name}.yml")
m.template 'fixtures.yml', File.join('test/fixtures', "#{table_name}.yml")
unless options[:skip_migration]
m.migration_template 'migration.rb', 'db/migrate', :assigns => {