Class: Koi::Content::Editor::ErrorsComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Koi::Content::Editor::ErrorsComponent
- Includes:
- Katalyst::HtmlAttributes, Turbo::FramesHelper
- Defined in:
- app/components/koi/content/editor/errors_component.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
readonly
Returns the value of attribute container.
Instance Method Summary collapse
- #form_builder ⇒ Object
- #id ⇒ Object
-
#initialize(container:) ⇒ ErrorsComponent
constructor
A new instance of ErrorsComponent.
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
#container ⇒ Object (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_builder ⇒ Object
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 |
#id ⇒ Object
18 19 20 |
# File 'app/components/koi/content/editor/errors_component.rb', line 18 def id dom_id(container, :errors) end |