Sha256: 3c305716a9f3ed02341aae3d3be79354112a72826c44cd75157e58a198c90429
Contents?: true
Size: 532 Bytes
Versions: 11
Compression:
Stored size: 532 Bytes
Contents
module Cms module NavMenuHelper extend ActiveSupport::Concern included do helper_method :new_button_path, :target_section end # In most cases, the 'New' button should go to create a new page. def new_button_path cms.new_section_page_path(target_section) end # Used to determine which section a New Page should go in, based on the current context. def target_section if @page && @page.parent @page.parent else Cms::Section.first end end end end
Version data entries
11 entries across 11 versions & 2 rubygems