From f2d0be00325c9e325319a1f97b993125dcb7b9e4 Mon Sep 17 00:00:00 2001 From: Adam Meehan Date: Thu, 14 Oct 2010 19:00:53 +1100 Subject: [PATCH] use Date.current in readme example --- README.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rdoc b/README.rdoc index 658e2ef..22d433c 100644 --- a/README.rdoc +++ b/README.rdoc @@ -71,14 +71,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, :on_or_before => lambda { Date.today } + validates_date :date_of_birth, :on_or_before => lambda { Date.current } # or - validates :date_of_birth, :timeliness => {:on_or_before => lambda { Date.today }, :type => :date} + validates :date_of_birth, :timeliness => {:on_or_before => lambda { Date.current }, :type => :date} end # or even on a specific record, per ActiveModel API. - @person.validates_date :date_of_birth, :on_or_before => lambda { Date.today } + @person.validates_date :date_of_birth, :on_or_before => lambda { Date.current } The list of validation methods available are as follows: