The default behavior for a regular rails form that has errors is to 1) list the errors in a div, with the text coming from errors_for
and 2) to place a div around the offending inputs with a red border. This question is concerning #2.
I'd like to know how rails goes about applying that div with the red border.
I'd like to know because I have some form inputs that aren't generated with f.text_field
(for example), but they are attached to a model that can have errors.
I looked around in the source of action_view/helpers/form_tag_helper.rb
All I was able to figure out is that form errors aren't applied by form_tag_helper