mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Singularize association names before camelization
So that irregular multi-word pluralization rules have to be defined only for snake-case strings.
This commit is contained in:
parent
542457b5d2
commit
bcfa2bf958
1 changed files with 2 additions and 2 deletions
|
@ -449,9 +449,9 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def derive_class_name
|
||||
class_name = name.to_s.camelize
|
||||
class_name = name.to_s
|
||||
class_name = class_name.singularize if collection?
|
||||
class_name
|
||||
class_name.camelize
|
||||
end
|
||||
|
||||
def derive_foreign_key
|
||||
|
|
Loading…
Reference in a new issue