Module: Shoelace::Components::ErrorWrappable

Included in:
SlCheckbox, SlCollectionRadioButtons, SlCollectionSelect, SlColorPicker, SlGroupedCollectionSelect, SlInput, SlRadioButton, SlRange, SlSelect, SlSwitch, SlTextarea
Defined in:
app/helpers/shoelace/components/error_wrappable.rb

Instance Method Summary collapse

Instance Method Details

#error_wrapping(html_tag) ⇒ Object



6
7
8
9
10
11
12
# File 'app/helpers/shoelace/components/error_wrappable.rb', line 6

def error_wrapping(html_tag)
  if object_has_errors? && field_error_proc
    @template_object.instance_exec(html_tag, self, &field_error_proc)
  else
    html_tag
  end
end