From e06054dd4c8fa506824066fdae149425d2efb2d4 Mon Sep 17 00:00:00 2001 From: Adam Meehan Date: Mon, 2 Aug 2010 17:00:45 +1000 Subject: [PATCH] readme updates --- README.rdoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.rdoc b/README.rdoc index 58769fc..106b386 100644 --- a/README.rdoc +++ b/README.rdoc @@ -61,6 +61,7 @@ The list of validation methods available are as follows: validates_date - validate value as date validates_time - validate value as time only i.e. '12:20pm' validates_datetime - validate value as a full date and time + validates - use the :timeliness key and set the type in the hash. The validation methods take the usual options plus some specific ones to restrict the valid range of dates or times allowed @@ -133,6 +134,19 @@ corner cases a little harder to test. In general if you are using procs or model methods and you only care when they return a value, then they should return nil in all other situations. Restrictions are skipped if they are nil. +=== DISPLAY INVALID VALUES IN DATE/TIME SELECT HELPERS: + +The plugin has some extensions to ActionView for allowing invalid +date and time values to be redisplayed to the user as feedback, instead of +a blank field which happens by default in Rails. Though the date helpers make this a +pretty rare occurence, given the select dropdowns for each date/time component, but +it may be something of interest. + +To activate it, put this in an initializer: + + # in the setup block + config.enable_date_time_select_extension! + ...