Class: Koi::Content::Editor::ErrorsComponent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container:) ⇒ ErrorsComponent

Returns a new instance of ErrorsComponent.



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

def initialize(container:)
  super()

  @container = container
end

Instance Attribute Details

#containerObject (readonly)

Returns the value of attribute container.



10
11
12
# File 'app/components/koi/content/editor/errors_component.rb', line 10

def container
  @container
end

Instance Method Details

#form_builderObject



22
23
24
# File 'app/components/koi/content/editor/errors_component.rb', line 22

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

#idObject



18
19
20
# File 'app/components/koi/content/editor/errors_component.rb', line 18

def id
  dom_id(container, :errors)
end