Class: Hyrax::ControlledVocabularies::Location

Inherits:
ActiveTriples::Resource
  • Object
show all
Defined in:
lib/hyrax/controlled_vocabularies/location.rb

Instance Method Summary collapse

Instance Method Details

#solrizeObject

Return a tuple of url & label


7
8
9
10
# File 'lib/hyrax/controlled_vocabularies/location.rb', line 7

def solrize
  return [rdf_subject.to_s] if rdf_label.first.to_s.blank? || rdf_label.first.to_s == rdf_subject.to_s
  [rdf_subject.to_s, { label: "#{rdf_label.first}$#{rdf_subject}" }]
end