Sha256: 6935c672f1d27415496bb0ca24e83d556650a6ac74701a5d67dceb1de27a1a5a

Contents?: true

Size: 1.41 KB

Versions: 31

Compression:

Stored size: 1.41 KB

Contents

# Generated via
#  `rails generate active_fedora:model <%= class_name %>`
class <%= class_name %> < ActiveFedora::Base
  <% if options['datastream'] %>
  contains :descMetadata, class_name: "<%= options['datastream'] %>"
  <% else %>
  # Define some properties to store:
  #
  property :title, predicate: ::RDF::Vocab::DC.title do |index|
    index.as :stored_searchable, :facetable
  end
  property :creator, predicate: ::RDF::Vocab::DC.creator do |index|
    index.as :stored_searchable, :facetable
  end
  property :contributor, predicate: ::RDF::Vocab::DC.contributor do |index|
    index.as :stored_searchable, :facetable
  end
  property :description, predicate: ::RDF::Vocab::DC.description do |index|
    index.as :stored_searchable
  end
  <%- end -%>
  <% if options['contains'] %>
  contains :<%= options['contains'] %>"
  <% else %>
  # Uncomment the following lines to add an #attachment method that is a file
  #
  # contains "attachment"
  <% end %>
  #
  # If you need to add additional attributes to the SOLR document, extend the default indexer:
  #
  # def indexer
  #   MyApp::IndexingService
  # end
  #
  # This can go into app/services/my_app/indexing_service.rb
  # module MyApp
  #   class IndexingService < ActiveFedora::IndexingService
  #     def generate_solr_document
  #       super.tap do |solr_doc|
  #         solr_doc["my_attribute_s"] = object.my_attribute
  #       end
  #     end
  #   end
  # end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
active-fedora-10.3.0 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-9.7.3 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.3.0.rc2 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.3.0.rc1 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.2.1 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.2.0 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.1.0 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.1.0.rc1 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-9.7.2 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.0.0 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.0.0.beta4 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.0.0.beta3 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.0.0.beta2 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-10.0.0.beta1 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-9.13.0 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-9.12.0 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-9.11.0 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-9.10.4 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-9.10.3 lib/generators/active_fedora/model/templates/model.rb.erb
active-fedora-9.10.2 lib/generators/active_fedora/model/templates/model.rb.erb