Sha256: e0c94905037380215bfcafb28e4fecff22e5c0f0f231f093e59fec7103831d2b
Contents?: true
Size: 766 Bytes
Versions: 11
Compression:
Stored size: 766 Bytes
Contents
module Cms module MobileHelper def full_site_url options = { :host => Rails.configuration.cms.site_domain, path: current_page.path, params: {:prefer_full_site => true} } ActionDispatch::Http::URL.url_for(options) end def mobile_site_url options = { :host => Rails.configuration.cms.site_domain, path: current_page.path, params: {:prefer_mobile_site => true} } ActionDispatch::Http::URL.url_for(options) end # Determines if the mobile template exists for a given page. # Used by view to show/hide the mobile toggle. def mobile_template_exists?(page) controller.template_exists?(page.layout_name, "layouts/mobile") end end end
Version data entries
11 entries across 11 versions & 2 rubygems