[PATCH] Update guides after Jeremy Kemper's changes on fieldWithErrors
to field_with_errors [#157 state:resolved]
This commit is contained in:
parent
3e196db6ad
commit
2d2bde9f54
@ -799,7 +799,7 @@ h4. Customizing the Error Messages CSS
|
||||
|
||||
The selectors to customize the style of error messages are:
|
||||
|
||||
* +.fieldWithErrors+ - Style for the form fields and labels with errors.
|
||||
* +.field_with_errors+ - Style for the form fields and labels with errors.
|
||||
* +#errorExplanation+ - Style for the +div+ element with the error messages.
|
||||
* +#errorExplanation h2+ - Style for the header of the +div+ element.
|
||||
* +#errorExplanation p+ - Style for the paragraph that holds the message that appears right below the header of the +div+ element.
|
||||
@ -811,7 +811,7 @@ The name of the class and the id can be changed with the +:class+ and +:id+ opti
|
||||
|
||||
h4. Customizing the Error Messages HTML
|
||||
|
||||
By default, form fields with errors are displayed enclosed by a +div+ element with the +fieldWithErrors+ CSS class. However, it's possible to override that.
|
||||
By default, form fields with errors are displayed enclosed by a +div+ element with the +field_with_errors+ CSS class. However, it's possible to override that.
|
||||
|
||||
The way form fields with errors are treated is defined by +ActionView::Base.field_error_proc+. This is a +Proc+ that receives two parameters:
|
||||
|
||||
|
@ -181,7 +181,7 @@ There are only a few configuration options for Action View, starting with four o
|
||||
|
||||
* +config.action_view.warn_cache_misses+ tells Rails to display a warning whenever an action results in a cache miss on your view paths. The default is +false+.
|
||||
|
||||
* +config.action_view.field_error_proc+ provides an HTML generator for displaying errors that come from Active Record. The default is <tt>Proc.new{ |html_tag, instance| "<div class=\"fieldWithErrors\">#{html_tag}</div>" }</tt>
|
||||
* +config.action_view.field_error_proc+ provides an HTML generator for displaying errors that come from Active Record. The default is <tt>Proc.new{ |html_tag, instance| "<div class=\"field_with_errors\">#{html_tag}</div>" }</tt>
|
||||
|
||||
* +config.action_view.default_form_builder+ tells Rails which form builder to use by default. The default is +ActionView::Helpers::FormBuilder+.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user