Method: ActionView::Helpers::ActiveModelInstanceTag#error_wrapping

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

#error_wrapping(html_tag) ⇒ Object



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

def error_wrapping(html_tag)
  if object_has_errors?
    Base.field_error_proc.call(html_tag, self)
  else
    html_tag
  end
end