Class: PandaCms::MenuItem
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- PandaCms::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.
27 28 29 30 31 32 33 34 35 |
# File 'app/models/panda_cms/menu_item.rb', line 27 def resolved_link if page page.path elsif external_url external_url else "" end end |