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

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

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



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

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