Sha256: d146e04402877606f2b66be929e050516c58c4979103352a5675e094ff2f23b9
Contents?: true
Size: 584 Bytes
Versions: 16
Compression:
Stored size: 584 Bytes
Contents
module Landable module PagesHelper def landable(page = current_page) return Landable::NullPageDecorator.new if page.nil? @landable ||= Landable::PageDecorator.new(page) end def current_page if params[:controller] == "landable/public/preview/page_revisions" current_page = PageRevision.find(params[:id]) elsif params[:controller] == "landable/public/preview/pages" current_page = Page.find(params[:id]) else current_page = Page.by_path(request.path) end @current_page ||= current_page end end end
Version data entries
16 entries across 16 versions & 1 rubygems