mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Pointing out that dynamic_form plugin must be installed to be able to use error_messages and error_messages_for view helpers.
This commit is contained in:
parent
9b35eeec62
commit
6ff10c17aa
1 changed files with 14 additions and 1 deletions
|
@ -738,7 +738,20 @@ person.errors.size # => 0
|
|||
|
||||
h3. Displaying Validation Errors in the View
|
||||
|
||||
Rails provides built-in helpers to display the error messages of your models in your view templates.
|
||||
Rails maintains an official plugin that provides helpers to display the error messages of your models in your view templates. You can install it as a plugin or as a Gem.
|
||||
|
||||
h4. Installing as a plugin
|
||||
<shell>
|
||||
$ rails plugin install git://github.com/rails/dynamic_form.git
|
||||
</shell>
|
||||
|
||||
h4 Installing as a Gem
|
||||
Add this line on your Gemfile:
|
||||
<ruby>
|
||||
gem "dynamic_form"
|
||||
</ruby>
|
||||
|
||||
Now you will have access to these two methods in your view templates:
|
||||
|
||||
h4. +error_messages+ and +error_messages_for+
|
||||
|
||||
|
|
Loading…
Reference in a new issue