Default to plural table name in Rails Generator if ActiveRecord is not present. Closes #8963 [evan]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7183 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
816522ecd8
commit
f9b7394430
@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Default to plural table name in Rails Generator if ActiveRecord is not present. Closes #8963 [evan]
|
||||
|
||||
* Added rake routes for listing all the defined routes in the system #8795 [josh]
|
||||
|
||||
* db:create creates the database for the current environment if it's on localhost. db:create:all creates local databases for all environments. #8783 [matt]
|
||||
|
@ -228,7 +228,7 @@ def assign_names!(name)
|
||||
@name = 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 = ActiveRecord::Base.pluralize_table_names ? plural_name : singular_name
|
||||
@table_name = (!defined?(ActiveRecord::Base) || ActiveRecord::Base.pluralize_table_names) ? plural_name : singular_name
|
||||
if @class_nesting.empty?
|
||||
@class_name = @class_name_without_nesting
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user