Class: Koi::Navigation::Editor::ErrorsComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
Katalyst::HtmlAttributes, Katalyst::Tables::TurboReplaceable, Turbo::FramesHelper
Defined in:
app/components/koi/navigation/editor/errors_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(menu:) ⇒ ErrorsComponent

Returns a new instance of ErrorsComponent.



13
14
15
16
17
# File 'app/components/koi/navigation/editor/errors_component.rb', line 13

def initialize(menu:)
  super()

  @menu = menu
end

Instance Attribute Details

Returns the value of attribute menu.



11
12
13
# File 'app/components/koi/navigation/editor/errors_component.rb', line 11

def menu
  @menu
end

Instance Method Details

#form_builderObject



23
24
25
# File 'app/components/koi/navigation/editor/errors_component.rb', line 23

def form_builder
  Koi::FormBuilder.new(menu.model_name.param_key, menu, self, {})
end

#idObject



19
20
21
# File 'app/components/koi/navigation/editor/errors_component.rb', line 19

def id
  dom_id(menu, :errors)
end