Sha256: d91e46a676dd3e7489b8193e85c76dd26950bbce8f6db8a9bb87b0599d18423f
Contents?: true
Size: 858 Bytes
Versions: 24
Compression:
Stored size: 858 Bytes
Contents
module Cmor module Cms # Usage: # # # app/controllers/application_controller.rb # class ApplicationController < ActionController::Base # view_helper Cmor::Cms::ApplicationViewHelper, as: :cms_helper # end # class ApplicationViewHelper < Rao::ViewHelper::Base def title c.content_for(:title) end def meta_description "<meta name=\"description\" content=\"#{c.content_for(:meta_description)}\">" end def link_to_top c.render partial: '/cmor/cms/link_to_top' end def is_page? params[:action] == 'respond' && params.has_key?(:page) end def current_page?(page) cms_page? && params[:page].to_s == page.to_s end def current_page cms_page? ? params[:page].to_s : nil end end end end
Version data entries
24 entries across 24 versions & 1 rubygems