Sha256: 15ce0da20592156e50f2c5781d38ba19b412ef3ece608424e4f30e12a2676652
Contents?: true
Size: 670 Bytes
Versions: 53
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true module Spotlight ## # Exhibit saved searches class Group < ActiveRecord::Base include Spotlight::Translatables extend FriendlyId friendly_id :title, use: %i[slugged scoped finders history], scope: [:exhibit] translates :title self.table_name = 'spotlight_groups' belongs_to :exhibit has_many :group_members has_many :searches, through: :group_members, source: :member, source_type: 'Spotlight::Search' default_scope { order('weight ASC') } scope :published, -> { where(published: true) } accepts_nested_attributes_for :group_members accepts_nested_attributes_for :searches end end
Version data entries
53 entries across 53 versions & 1 rubygems