Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 dhh authored
2  railties/CHANGELOG
View
@@ -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]
2  railties/lib/rails_generator/generators/components/model/model_generator.rb
View
@@ -14,7 +14,7 @@ def manifest
# 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 => {
Please sign in to comment.
Something went wrong with that request. Please try again.