Sha256: b5a620c5e65de97f23ad644b7bd0566f07aeb5db82f277d0409c3aa4030ba497
Contents?: true
Size: 764 Bytes
Versions: 48
Compression:
Stored size: 764 Bytes
Contents
# frozen_string_literal: true module Spotlight ## # Exhibit home page class HomePage < Spotlight::Page extend FriendlyId friendly_id :title, use: %i[slugged scoped finders history], scope: %i[exhibit locale] do |config| config.reserved_words&.concat(%w[update_all]) end before_save :publish before_create :default_content class << self def default_title_text I18n.t('spotlight.pages.index.home_pages.title') end end def should_display_title? display_title? end def display_sidebar? display_sidebar end private def publish self.published = true end def default_content self.title ||= Spotlight::HomePage.default_title_text end end end
Version data entries
48 entries across 48 versions & 1 rubygems