lib/generators/dbla/templates/collection.rb in dbla-0.0.5 vs lib/generators/dbla/templates/collection.rb in dbla-0.0.6

- old
+ new

@@ -1,10 +1,11 @@ # -*- encoding : utf-8 -*- class Collection include Blacklight::Solr::Document - # The following shows how to setup this blacklight document to display marc documents + include Dbla::Document + # The following shows how to setup this blacklight document to display marc documents extension_parameters[:marc_source_field] = :marc_display extension_parameters[:marc_format_type] = :marcxml use_extension( Blacklight::Solr::Document::Marc) do |document| document.key?( :marc_display ) end @@ -31,15 +32,6 @@ # single valued. See Blacklight::Document::SemanticFields#field_semantics # and Blacklight::Document::SemanticFields#to_semantic_values # Recommendation: Use field names from Dublin Core use_extension( Blacklight::Document::DublinCore) - def has? f, *values - # these are shenanigans to find a nested field - if f.is_a? String and f.index('.') - f = f.split('.') - f.inject(self) {|m,v| (m || {})[v]} - else - super - end - end end \ No newline at end of file