diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-11-16 23:01:24 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-11-16 23:01:24 +0000 |
commit | 24c9250968dda116f1383de75b08cd0bf37ad394 (patch) | |
tree | 62dd502a774e14f2a0809172ca800a23801143bf | |
parent | ace7518fcb3d592f63d599f299699c653980c396 (diff) | |
download | rails-24c9250968dda116f1383de75b08cd0bf37ad394.tar.gz rails-24c9250968dda116f1383de75b08cd0bf37ad394.tar.bz2 rails-24c9250968dda116f1383de75b08cd0bf37ad394.zip |
Table names aren't nested: replace / with _ to match the likely table name.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/lib/rails_generator/base.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails_generator/base.rb b/railties/lib/rails_generator/base.rb index 752f54a2d4..1ebcff9062 100644 --- a/railties/lib/rails_generator/base.rb +++ b/railties/lib/rails_generator/base.rb @@ -230,6 +230,7 @@ module Rails base_name, @class_path, @file_path, @class_nesting, @class_nesting_depth = extract_modules(@name) @class_name_without_nesting, @singular_name, @plural_name = inflect_names(base_name) @table_name = (!defined?(ActiveRecord::Base) || ActiveRecord::Base.pluralize_table_names) ? plural_name : singular_name + @table_name.gsub! '/', '_' if @class_nesting.empty? @class_name = @class_name_without_nesting else |