提交 24c92509 编写于 作者: J Jeremy Kemper

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
上级 ace7518f
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册