app/models/spotlight/solr_document_sidecar.rb in blacklight-spotlight-3.6.0.beta7 vs app/models/spotlight/solr_document_sidecar.rb in blacklight-spotlight-3.6.0.beta8
- old
+ new
@@ -9,11 +9,17 @@
acts_as_taggable
belongs_to :exhibit, optional: false
belongs_to :resource, optional: true
belongs_to :document, optional: false, polymorphic: true
- serialize :data, Hash, coder: YAML
- serialize :index_status, Hash, coder: YAML
+
+ if Rails.version > '7.1'
+ serialize :data, type: Hash, coder: YAML
+ serialize :index_status, type: Hash, coder: YAML
+ else
+ serialize :data, Hash, coder: YAML
+ serialize :index_status, Hash, coder: YAML
+ end
delegate :has_key?, :key?, to: :data
def to_solr
{ document.class.unique_key.to_sym => document.id,