Module: ActiveModel::Conversion::ClassMethods

Defined in:
lib/active_model/conversion.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#_to_partial_pathObject

Provide a class level cache for #to_partial_path. This is an internal method and should not be accessed directly.



91
92
93
94
95
96
97
# File 'lib/active_model/conversion.rb', line 91

def _to_partial_path #:nodoc:
  @_to_partial_path ||= begin
    element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(name))
    collection = ActiveSupport::Inflector.tableize(name)
    "#{collection}/#{element}".freeze
  end
end