Class: StimulusPlumbers::Form::Fields::Fieldset
- Inherits:
-
Plumber::Base
- Object
- Plumber::Base
- StimulusPlumbers::Form::Fields::Fieldset
- Defined in:
- lib/stimulus_plumbers/form/fields/fieldset.rb
Instance Attribute Summary
Attributes inherited from Plumber::Base
Instance Method Summary collapse
Methods inherited from Plumber::Base
Methods included from Plumber::Renderer
#set_slots, #slot_block_for, #slot_kwargs_for, #slot_renderable?
Methods included from Plumber::Options::Aria
Methods included from Plumber::Options::Html
Constructor Details
This class inherits a constructor from StimulusPlumbers::Plumber::Base
Instance Method Details
#render(object, attribute, input_id, field, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/stimulus_plumbers/form/fields/fieldset.rb', line 7 def render(object, attribute, input_id, field, &block) error = field.error?(object, attribute) fieldset_opts = build_fieldset_aria(field, object, attribute, input_id, error) Group.new(template).render(layout: :stacked, error: error) do template.safe_join( [ build_fieldset(fieldset_opts, field, attribute, error, &block), field.render_hint(input_id), field.render_errors(object, attribute, input_id) ] ) end end |