Sha256: ee2514a0efc914ec4e33f4210384b55c4142442c7ae0db4cde8c2fe149b59b1d
Contents?: true
Size: 440 Bytes
Versions: 76
Compression:
Stored size: 440 Bytes
Contents
# frozen_string_literal: true module Spotlight ## # Global spotlight configuration class Site < ActiveRecord::Base has_many :exhibits, -> { ordered_by_weight } has_many :roles, as: :resource belongs_to :masthead, dependent: :destroy, optional: true accepts_nested_attributes_for :masthead, update_only: true accepts_nested_attributes_for :exhibits def self.instance first || create end end end
Version data entries
76 entries across 76 versions & 1 rubygems