Sha256: 7eb3bdac623760609b06f37d742d2ca60129cb8d090dce115e8641b9097f715c
Contents?: true
Size: 753 Bytes
Versions: 14
Compression:
Stored size: 753 Bytes
Contents
# frozen_string_literal: true module Maglev module StandaloneSectionsConcern extend ActiveSupport::Concern included do include Maglev::ServicesConcern include Maglev::FetchersConcern include Maglev::ContentLocaleConcern helper Maglev::PagePreviewHelper end private def fetch_maglev_site_scoped_sections return if within_maglev_engine? fetch_maglev_site fetch_maglev_theme fetch_maglev_dummy_page fetch_maglev_page_sections end def fetch_maglev_dummy_page @fetch_maglev_page = ::Maglev::Page.new(title: 'DummyPage', sections: fetch_maglev_site.sections) end def within_maglev_engine? controller_path.starts_with?('maglev/') end end end
Version data entries
14 entries across 14 versions & 1 rubygems