Sha256: b1870a004699072690038f2297a8dbf4d0d8e92f9630827e0701d695b7c60c56
Contents?: true
Size: 688 Bytes
Versions: 18
Compression:
Stored size: 688 Bytes
Contents
# frozen_string_literal: true module Spotlight ## # Exhibit home page class HomePage < Spotlight::Page extend FriendlyId friendly_id :title, use: [:slugged, :scoped, :finders], scope: [:exhibit, :locale] 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
18 entries across 18 versions & 1 rubygems