From 712c1dd603fa17efb58dc1ab2799675da97f5c44 Mon Sep 17 00:00:00 2001 From: Adam Meehan Date: Sat, 7 Aug 2010 19:10:10 +1000 Subject: [PATCH] expand example --- README.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rdoc b/README.rdoc index 6364857..36f363c 100644 --- a/README.rdoc +++ b/README.rdoc @@ -56,14 +56,14 @@ To validate a model with a date, time or datetime attribute you just use the validation method class Person < ActiveRecord::Base - validates_date :date_of_birth + validates_date :date_of_birth, :on_or_before => lambda { Date.today } # or - validates :date_of_birth, :timeliness => {:type => date} + validates :date_of_birth, :timeliness => {:on_or_before => lambda { Date.today }, :type => date} end # or even on a specific record, per ActiveModel API. - @person.validates_date :date_of_birth + @person.validates_date :date_of_birth, :on_or_before => lambda { Date.today } The list of validation methods available are as follows: