Class: Katalyst::Navigation::Editor::Base

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/katalyst/navigation/editor/base.rb

Direct Known Subclasses

Errors, Item, List, Menu, NewItem, StatusBar

Constant Summary collapse

"navigation--editor--menu"
LIST_CONTROLLER =
"navigation--editor--list"
ITEM_CONTROLLER =
"navigation--editor--item"
STATUS_BAR_CONTROLLER =
"navigation--editor--status-bar"
NEW_ITEM_CONTROLLER =
"navigation--editor--new-item"
ATTRIBUTES_SCOPE =
"menu[items_attributes][]"
TURBO_FRAME =
"navigation--editor--item-frame"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template, menu) ⇒ Base

Returns a new instance of Base.



20
21
22
23
# File 'app/helpers/katalyst/navigation/editor/base.rb', line 20

def initialize(template, menu)
  self.template = template
  self.menu     = menu
end

Instance Attribute Details

Returns the value of attribute menu.



16
17
18
# File 'app/helpers/katalyst/navigation/editor/base.rb', line 16

def menu
  @menu
end

#templateObject

Returns the value of attribute template.



16
17
18
# File 'app/helpers/katalyst/navigation/editor/base.rb', line 16

def template
  @template
end

Instance Method Details



25
26
27
# File 'app/helpers/katalyst/navigation/editor/base.rb', line 25

def menu_form_id
  dom_id(menu, :items)
end