aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamison Dance <jergason@gmail.com>2010-11-20 14:55:39 -0700
committerJamison Dance <jergason@gmail.com>2010-11-20 14:55:39 -0700
commitd773ef8e8c819f09ad3b436b11631c26e4ca2ff9 (patch)
tree789b264937d563a87b48d62b9b591c54840d064b
parent3ddbaf955e45eed15662e2f141b75dc0df63c1b0 (diff)
downloadrails-d773ef8e8c819f09ad3b436b11631c26e4ca2ff9.tar.gz
rails-d773ef8e8c819f09ad3b436b11631c26e4ca2ff9.tar.bz2
rails-d773ef8e8c819f09ad3b436b11631c26e4ca2ff9.zip
fix some grammar issues with section 2.5
-rw-r--r--railties/guides/source/active_record_validations_callbacks.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index 444a1d4154..59db20c926 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -141,7 +141,7 @@ end
h4(#validations_overview-errors). +errors[]+
-To verify whether or not a particular attribute of an object is valid, you can use +errors[:attribute]+ that returns an array with all attribute errors, when there are no errors on the specified attribute, an empty array is returned.
+To verify whether or not a particular attribute of an object is valid, you can use +errors[:attribute]+. It returns an array of all the errors for +:attribue+. If there are no errors on the specified attribute, an empty array is returned.
This method is only useful _after_ validations have been run, because it only inspects the errors collection and does not trigger validations itself. It's different from the +ActiveRecord::Base#invalid?+ method explained above because it doesn't verify the validity of the object as a whole. It only checks to see whether there are errors found on an individual attribute of the object.