Module: ActiveModel::Conversion::ClassMethods
- Defined in:
- activemodel/lib/active_model/conversion.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#_to_partial_path ⇒ Object
Provide a class level cache for the to_path.
Instance Method Details
#_to_partial_path ⇒ Object
Provide a class level cache for the to_path. This is an internal method and should not be accessed directly.
64 65 66 67 68 69 70 |
# File 'activemodel/lib/active_model/conversion.rb', line 64 def _to_partial_path #:nodoc: @_to_partial_path ||= begin element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(self)) collection = ActiveSupport::Inflector.tableize(self) "#{collection}/#{element}".freeze end end |