aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/active_record_validations_callbacks.textile
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-08-16 11:06:40 -0700
committerXavier Noria <fxn@hashref.com>2011-08-16 11:06:40 -0700
commit0245792c833c8b13fe53f8ae9f477b63dab928b6 (patch)
tree5b87fcfd31d9189647d06caa6444e36bdcda32ac /railties/guides/source/active_record_validations_callbacks.textile
parentd0d25a9317aaea794f30e067e9388fe4e08bcde5 (diff)
parentc5f97b5063d1d60341f9e984f29a3b9812fb4c7e (diff)
downloadrails-0245792c833c8b13fe53f8ae9f477b63dab928b6.tar.gz
rails-0245792c833c8b13fe53f8ae9f477b63dab928b6.tar.bz2
rails-0245792c833c8b13fe53f8ae9f477b63dab928b6.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties/guides/source/active_record_validations_callbacks.textile')
-rw-r--r--railties/guides/source/active_record_validations_callbacks.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index 977e736d25..aba3224ba7 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -751,8 +751,6 @@ class Person < ActiveRecord::Base
end
</ruby>
-
-
h4. +errors.clear+
The +clear+ method is used when you intentionally want to clear all the messages in the +errors+ collection. Of course, calling +errors.clear+ upon an invalid object won't actually make it valid: the +errors+ collection will now be empty, but the next time you call +valid?+ or any method that tries to save this object to the database, the validations will run again. If any of the validations fail, the +errors+ collection will be filled again.
@@ -799,6 +797,7 @@ h3. Displaying Validation Errors in the View
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/joelmoss/dynamic_form.git
</shell>
@@ -806,6 +805,7 @@ $ rails plugin install git://github.com/joelmoss/dynamic_form.git
h4. Installing as a Gem
Add this line in your Gemfile:
+
<ruby>
gem "dynamic_form"
</ruby>