Sha256: 3ea2b1a70fcb451c8738faf88d3b86285f6ff987002b2c5fe7ff0648fbd56889
Contents?: true
Size: 525 Bytes
Versions: 5
Compression:
Stored size: 525 Bytes
Contents
module Adminos::Controllers::Helpers extend ActiveSupport::Concern included do helper_method :settings, :top_navigation, :current_page, :title_default end def settings @settings ||= Settings.get end def top_navigation @top_navigation ||= Page.navigation_top end def current_page @current_page ||= Page.published.find params[:page_id] if params[:page_id] end def title_default title ||= settings.index_meta_title title.present? ? title : current_page.name rescue nil end end
Version data entries
5 entries across 5 versions & 1 rubygems