Method: ActionView::Helpers::ActiveModelInstanceTag#error_wrapping

Defined in:
lib/action_view/helpers/active_model_helper.rb

#error_wrapping(html_tag) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/action_view/helpers/active_model_helper.rb', line 28

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