Skip to content
Browse files

fix some grammar issues with section 2.5

  • Loading branch information...
1 parent 1e1711c commit 255e47d72faef0150b23c181c6c17eaf958322a6 @jergason jergason committed with fxn Nov 20, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/active_record_validations_callbacks.textile
View
2 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.

0 comments on commit 255e47d

Please sign in to comment.
Something went wrong with that request. Please try again.