Class: Panda::CMS::MenuItem
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Panda::CMS::MenuItem
- Defined in:
- app/models/panda/cms/menu_item.rb
Instance Method Summary collapse
-
#resolved_link ⇒ String
Returns the resolved link for the menu item.
Instance Method Details
#resolved_link ⇒ String
Returns the resolved link for the menu item.
If the menu item is associated with a page, it returns the path of the page. If the menu item is associated with an external URL, it returns the external URL.
32 33 34 35 36 37 38 39 40 |
# File 'app/models/panda/cms/menu_item.rb', line 32 def resolved_link if page page.path elsif external_url external_url else "" end end |