app/models/spotlight/search.rb in blacklight-spotlight-1.5.1 vs app/models/spotlight/search.rb in blacklight-spotlight-2.0.0.rc1

- old
+ new

@@ -1,17 +1,21 @@ module Spotlight ## # Exhibit saved searches class Search < ActiveRecord::Base + include Spotlight::Translatables extend FriendlyId friendly_id :title, use: [:slugged, :scoped, :finders, :history], scope: :exhibit self.table_name = 'spotlight_searches' belongs_to :exhibit serialize :query_params, Hash default_scope { order('weight ASC') } scope :published, -> { where(published: true) } validates :title, presence: true + + translates :title, :long_description + has_paper_trail belongs_to :masthead, dependent: :destroy, optional: true belongs_to :thumbnail, class_name: 'Spotlight::FeaturedImage', dependent: :destroy, optional: true accepts_nested_attributes_for :thumbnail, update_only: true, reject_if: proc { |attr| attr['iiif_tilesource'].blank? }