Module: Cms::MobileHelper
- Defined in:
- app/helpers/cms/mobile_helper.rb
Instance Method Summary collapse
- #full_site_url ⇒ Object
- #mobile_site_url ⇒ Object
-
#mobile_template_exists?(page) ⇒ Boolean
Determines if the mobile template exists for a given page.
Instance Method Details
#full_site_url ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'app/helpers/cms/mobile_helper.rb', line 4 def full_site_url = { :host => Rails.configuration.cms.site_domain, path: current_page.path, params: {:prefer_full_site => true} } ActionDispatch::Http::URL.url_for() end |
#mobile_site_url ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/helpers/cms/mobile_helper.rb', line 13 def mobile_site_url = { :host => Rails.configuration.cms.site_domain, path: current_page.path, params: {:prefer_mobile_site => true} } ActionDispatch::Http::URL.url_for() end |
#mobile_template_exists?(page) ⇒ Boolean
Determines if the mobile template exists for a given page. Used by view to show/hide the mobile toggle.
24 25 26 |
# File 'app/helpers/cms/mobile_helper.rb', line 24 def mobile_template_exists?(page) controller.template_exists?(page.layout_name, "layouts/mobile") end |