Module: Hyrax::WorkBehavior::ClassMethods

Defined in:
app/models/concerns/hyrax/work_behavior.rb

Instance Method Summary collapse

Instance Method Details

#_to_partial_pathObject

This governs which partial to draw when you render this type of object



39
40
41
42
43
44
45
# File 'app/models/concerns/hyrax/work_behavior.rb', line 39

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}"
  end
end