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 |
# File 'app/helpers/cms/mobile_helper.rb', line 4 def full_site_url main_app.url_for(:host => Rails.configuration.cms.site_domain, :prefer_full_site => true) end |
#mobile_site_url ⇒ Object
8 9 10 |
# File 'app/helpers/cms/mobile_helper.rb', line 8 def mobile_site_url main_app.url_for(:host => Rails.configuration.cms.site_domain, :prefer_mobile_site => true) 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.
14 15 16 |
# File 'app/helpers/cms/mobile_helper.rb', line 14 def mobile_template_exists?(page) controller.template_exists?(page.layout_name, "layouts/mobile") end |