Class: Katalyst::Navigation::Editor::ItemComponent

Inherits:
BaseComponent
  • Object
show all
Includes:
KpopHelper
Defined in:
app/components/katalyst/navigation/editor/item_component.rb

Constant Summary

Constants inherited from BaseComponent

BaseComponent::ITEM_CONTROLLER, BaseComponent::LIST_CONTROLLER, BaseComponent::MENU_CONTROLLER, BaseComponent::NEW_ITEM_CONTROLLER, BaseComponent::STATUS_BAR_CONTROLLER

Instance Attribute Summary

Attributes inherited from BaseComponent

#item, #menu

Instance Method Summary collapse

Methods inherited from BaseComponent

#call, #initialize, #menu_form_id

Constructor Details

This class inherits a constructor from Katalyst::Navigation::Editor::BaseComponent

Instance Method Details



9
10
11
12
13
14
15
# File 'app/components/katalyst/navigation/editor/item_component.rb', line 9

def edit_item_link
  if item.persisted?
    helpers.katalyst_navigation.edit_menu_item_path(menu, item)
  else
    helpers.katalyst_navigation.new_menu_item_path(item.menu, type: item.type)
  end
end