Sha256: a7d4e89636e28f67a9817c2499542200f9464fa5fa6c4dd47bf474516d8bdcb6
Contents?: true
Size: 481 Bytes
Versions: 1
Compression:
Stored size: 481 Bytes
Contents
module Hyrax module HumanReadableType extend ActiveSupport::Concern included do class_attribute :human_readable_type self.human_readable_type = name.demodulize.titleize end def to_solr(solr_doc = {}) super(solr_doc).tap do |doc| doc[Solrizer.solr_name('human_readable_type', :facetable)] = human_readable_type doc[Solrizer.solr_name('human_readable_type', :stored_searchable)] = human_readable_type end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
test_hyrax-0.0.1.alpha | app/models/concerns/hyrax/human_readable_type.rb |