diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-02 18:29:52 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-07-02 18:29:52 +0000 |
commit | dad9c4b2ee0cdc4558c2cb8442eb714fb75ba969 (patch) | |
tree | 4bb6149bee4066af50cd3b3ba26668ab16fa55fe /railties | |
parent | b94e8af9a4596723b654129b650da490783f209a (diff) | |
download | rails-dad9c4b2ee0cdc4558c2cb8442eb714fb75ba969.tar.gz rails-dad9c4b2ee0cdc4558c2cb8442eb714fb75ba969.tar.bz2 rails-dad9c4b2ee0cdc4558c2cb8442eb714fb75ba969.zip |
Fixed that model generator would make fixtures plural, even if ActiveRecord::Base.pluralize_table_names was false #1185 [Marcel Molina]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1612 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/model/model_generator.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index b22851552a..e169de3be1 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed that model generator would make fixtures plural, even if ActiveRecord::Base.pluralize_table_names was false #1185 [Marcel Molina] + * Added a DOCTYPE of HTML transitional to the HTML files generated by Rails #1124 [Michael Koziarski] * SIGTERM also gracefully exits dispatch.fcgi. Ignore SIGUSR1 on Windows. diff --git a/railties/lib/rails_generator/generators/components/model/model_generator.rb b/railties/lib/rails_generator/generators/components/model/model_generator.rb index a978b96b1c..2dfff81e61 100644 --- a/railties/lib/rails_generator/generators/components/model/model_generator.rb +++ b/railties/lib/rails_generator/generators/components/model/model_generator.rb @@ -12,7 +12,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', class_path, "#{ActiveRecord::Base.pluralize_table_names ? plural_name : singular_name}.yml") end end end |