aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source
diff options
context:
space:
mode:
authorRodrigo Navarro <rnavarro1@gmail.com>2011-02-27 10:03:50 -0800
committerXavier Noria <fxn@hashref.com>2011-03-05 11:56:32 +0100
commit3f97f056f9707101a14d0ff43db0866ddc7515c2 (patch)
tree24cbd647756e36b1742f9acedbbdfb6c1feadbd9 /railties/guides/source
parenteef713dd663dc0381d4a9c5479b3b8f1d254495c (diff)
downloadrails-3f97f056f9707101a14d0ff43db0866ddc7515c2.tar.gz
rails-3f97f056f9707101a14d0ff43db0866ddc7515c2.tar.bz2
rails-3f97f056f9707101a14d0ff43db0866ddc7515c2.zip
Pointing out that dynamic_form plugin must be installed to be able to use error_messages and error_messages_for view helpers.
Diffstat (limited to 'railties/guides/source')
-rw-r--r--railties/guides/source/active_record_validations_callbacks.textile15
1 files changed, 14 insertions, 1 deletions
diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index 5dc6ef3774..58a184a48e 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -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+