Browse files

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
  • Loading branch information...
1 parent ace7518 commit 24c9250968dda116f1383de75b08cd0bf37ad394 @jeremy jeremy committed Nov 16, 2007
Showing with 1 addition and 0 deletions.
  1. +1 −0 railties/lib/rails_generator/base.rb
View
1 railties/lib/rails_generator/base.rb
@@ -230,6 +230,7 @@ def assign_names!(name)
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

0 comments on commit 24c9250

Please sign in to comment.