Sha256: 91de4909369689eb8a7e5e8d943ef1de5cd454d973c9769ca1a6333f330b9e8c
Contents?: true
Size: 684 Bytes
Versions: 7
Compression:
Stored size: 684 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], scope: %i[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
7 entries across 7 versions & 1 rubygems