Module: Hyrax::CollectionBehavior::ClassMethods
- Defined in:
- app/models/concerns/hyrax/collection_behavior.rb
Instance Method Summary collapse
-
#_to_partial_path ⇒ Object
This governs which partial to draw when you render this type of object.
Instance Method Details
#_to_partial_path ⇒ Object
This governs which partial to draw when you render this type of object
44 45 46 47 48 49 50 |
# File 'app/models/concerns/hyrax/collection_behavior.rb', line 44 def _to_partial_path #:nodoc: @_to_partial_path ||= begin element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(name)) collection = ActiveSupport::Inflector.tableize(name) "hyrax/#{collection}/#{element}".freeze end end |