Module: ApplicationHelper
- Defined in:
- app/helpers/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#link_to_menu_item(menu_item) ⇒ Object
2 3 4 5 |
# File 'app/helpers/application_helper.rb', line 2 def () url = () link_to(.label, url) end |
#url_to_menu_item(menu_item) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/application_helper.rb', line 7 def () if 'link' == . url = .link else if .page_id page = Cms::Page.find(.page_id) url = page.url else ComfyPress.logger.warn('Page is not selected for menu item.') end end url end |