sufia-models/app/models/concerns/sufia/collection.rb in sufia-5.0.0 vs sufia-models/app/models/concerns/sufia/collection.rb in sufia-6.0.0.beta1
- old
+ new
@@ -9,11 +9,10 @@
included do
before_save :update_permissions
validates :title, presence: true
- has_metadata "properties", type: PropertiesDatastream
end
def terms_for_display
terms_for_editing - [:title, :description]
end
@@ -33,13 +32,13 @@
def to_param
noid
end
- def to_solr(solr_doc={}, opts={})
- super(solr_doc, opts)
- solr_doc[Solrizer.solr_name("noid", Sufia::GenericFile.noid_indexer)] = noid
- return solr_doc
+ def to_solr(solr_doc={})
+ super.tap do |solr_doc|
+ solr_doc[Solrizer.solr_name("noid", Sufia::GenericFile::Indexing.noid_indexer)] = noid
+ end
end
def update_permissions
self.visibility = "open"
end