diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-05-26 00:16:09 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-05-26 00:16:09 +0530 |
commit | ffaefe268184806977d7907243a98870593e4450 (patch) | |
tree | a199661bee34080db0aafa8e4d88fdea10330388 | |
parent | 492f60672c91a1fb9bab1c16a941f87c26444ac8 (diff) | |
download | rails-ffaefe268184806977d7907243a98870593e4450.tar.gz rails-ffaefe268184806977d7907243a98870593e4450.tar.bz2 rails-ffaefe268184806977d7907243a98870593e4450.zip |
fixed minor errors
-rw-r--r-- | railties/guides/source/active_record_validations_callbacks.textile | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile index 8721ca51c5..c9b03f169d 100644 --- a/railties/guides/source/active_record_validations_callbacks.textile +++ b/railties/guides/source/active_record_validations_callbacks.textile @@ -484,10 +484,10 @@ The +:allow_blank+ option is similar to the +:allow_nil+ option. This option wil <ruby> class Topic < ActiveRecord::Base - validates :title, :length => { :is => 5, :allow_blank => true } + validates :title, :length => { :is => 5 }, :allow_blank => true end -Topic.create("title" => "").valid? # => true +Topic.create("title" => "").valid? # => true Topic.create("title" => nil).valid? # => true </ruby> @@ -762,12 +762,13 @@ $ rails plugin install git://github.com/joelmoss/dynamic_form.git </shell> h4. Installing as a Gem + Add this line in your Gemfile: <ruby> gem "dynamic_form" </ruby> -Now you will have access to these two methods in your view templates: +Now you will have access to these two methods in your view templates. h4. +error_messages+ and +error_messages_for+ |