Class: Form::Group

Inherits:
UI::Base
  • Object
show all
Defined in:
app/views/form/group.rb

Instance Method Summary collapse

Instance Method Details

#view_templateObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/views/form/group.rb', line 9

def view_template
  div(class: classes, **data_attributes) do
    render_field

    div(class: "space-y-0.5") do
      errors.each do |error|
        render Form::Error.new(form:, method:, text: error, **error_options)
      end

      render Form::Hint.new(form:, method:, text: hint_text, **hint_options) if hint?
    end
  end
end