diff options
author | Hendy Tanata <htanata@gmail.com> | 2011-10-05 17:35:58 +0800 |
---|---|---|
committer | Hendy Tanata <htanata@gmail.com> | 2011-10-05 17:35:58 +0800 |
commit | a44bbfc1c7edb044ed9f73c7365a3a4a30b8b3fc (patch) | |
tree | e159d7da33adb7012dd523c09d95a7d4d191affb | |
parent | 463223c32445c535225fe0f134b854334c5649cc (diff) | |
download | rails-a44bbfc1c7edb044ed9f73c7365a3a4a30b8b3fc.tar.gz rails-a44bbfc1c7edb044ed9f73c7365a3a4a30b8b3fc.tar.bz2 rails-a44bbfc1c7edb044ed9f73c7365a3a4a30b8b3fc.zip |
Corrections to Active Record Validations and Callbacks guide.
-rw-r--r-- | railties/guides/source/active_record_validations_callbacks.textile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile index 6c6f29be32..600681ddd3 100644 --- a/railties/guides/source/active_record_validations_callbacks.textile +++ b/railties/guides/source/active_record_validations_callbacks.textile @@ -105,7 +105,7 @@ Person.create(:name => "John Doe").valid? # => true Person.create(:name => nil).valid? # => false </ruby> -After Active Record performing validations, any errors found can be accessed through the +errors+ instance method, which returns a collection of errors. By definition an object is valid if this collection is empty after running validations. +After Active Record has performed validations, any errors found can be accessed through the +errors+ instance method, which returns a collection of errors. By definition, an object is valid if this collection is empty after running validations. Note that an object instantiated with +new+ will not report errors even if it's technically invalid, because validations are not run when using +new+. @@ -812,7 +812,7 @@ Add this line in your Gemfile: gem "dynamic_form" </ruby> -Now you will have access to the two help methods +error_messages+ and +error_messages_for+ in your view templates. +Now you will have access to the two helper methods +error_messages+ and +error_messages_for+ in your view templates. h4. +error_messages+ and +error_messages_for+ @@ -907,7 +907,7 @@ ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| end </ruby> -The result look like the following: +The result looks like the following: !images/validation_error_messages.png(Validation error messages)! |