mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Pass strings to demodulize method
Goes along withfea1cdcff4
and59ec4562a2
.
This commit is contained in:
parent
8d8ea78a89
commit
c20fe91b05
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ module ActiveModel
|
|||
# internal method and should not be accessed directly.
|
||||
def _to_partial_path #:nodoc:
|
||||
@_to_partial_path ||= begin
|
||||
element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(self))
|
||||
element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(name))
|
||||
collection = ActiveSupport::Inflector.tableize(name)
|
||||
"#{collection}/#{element}".freeze
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue