Sha256: f8e2f673ba285bdc3f8b844a098c753e39c67cb1c013134f46c74422a11bcad9

Contents?: true

Size: 367 Bytes

Versions: 9

Compression:

Stored size: 367 Bytes

Contents

module Spotlight
  ##
  # Global spotlight configuration
  class Site < ActiveRecord::Base
    has_many :exhibits
    has_many :roles, as: :resource

    belongs_to :masthead, dependent: :destroy

    accepts_nested_attributes_for :masthead, update_only: true
    accepts_nested_attributes_for :exhibits

    def self.instance
      first || create
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-0.19.2 app/models/spotlight/site.rb
blacklight-spotlight-0.19.1 app/models/spotlight/site.rb
blacklight-spotlight-0.19.0 app/models/spotlight/site.rb
blacklight-spotlight-0.18.0 app/models/spotlight/site.rb
blacklight-spotlight-0.17.1 app/models/spotlight/site.rb
blacklight-spotlight-0.17.0 app/models/spotlight/site.rb
blacklight-spotlight-0.16.0 app/models/spotlight/site.rb
blacklight-spotlight-0.15.0 app/models/spotlight/site.rb
blacklight-spotlight-0.14.2 app/models/spotlight/site.rb