Provide a class level cache for #to_partial_path. This is an internal
method and should not be accessed directly.
# File activemodel/lib/active_model/conversion.rb, line 110
def _to_partial_path # :nodoc:
@_to_partial_path ||= if respond_to?(:model_name)
"#{model_name.collection}/#{model_name.element}"
else
element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(name))
collection = ActiveSupport::Inflector.tableize(name)
"#{collection}/#{element}"
end
end