Sha256: 8db6a785bd1dbda01c8eee364d726fdab7b5ece5b80346baddbd9dd057e6c013
Contents?: true
Size: 949 Bytes
Versions: 1
Compression:
Stored size: 949 Bytes
Contents
module Spotlight class HomePage < Spotlight::Page extend FriendlyId friendly_id :title, use: [:slugged,:scoped,:finders], scope: :exhibit before_save :publish before_create :default_content def should_display_title? display_title end def display_sidebar? exhibit.searchable? end private def self.default_content_text "This is placeholder content for the exhibit homepage. Curators of this exhibit can edit this page to customize it for the exhibit." end def self.default_title_text "Exhibit Home" end def publish self.published = true end def default_content self.title = Spotlight::HomePage.default_title_text self.content = { "data" => [ {"type" => "text", "data" => { "text" => Spotlight::HomePage.default_content_text } } ] }.to_json end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blacklight-spotlight-0.2.0 | app/models/spotlight/home_page.rb |