mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-24 14:56:43 +00:00
datetime select helper extension activation in readme
This commit is contained in:
parent
1e3c802031
commit
6d12790d2b
14
README.rdoc
14
README.rdoc
@ -266,6 +266,20 @@ 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
|
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.
|
return nil in all other situations. Restrictions are skipped if they are nil.
|
||||||
|
|
||||||
|
|
||||||
|
=== DISPLAY INVALID VALUES IN DATE HELPERS:
|
||||||
|
|
||||||
|
The plugin has some extensions to ActionView and ActiveRecord by 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:
|
||||||
|
|
||||||
|
ValidatesTimeliness.enable_datetime_select_extension!
|
||||||
|
|
||||||
|
|
||||||
=== OTHER CUSTOMISATION:
|
=== OTHER CUSTOMISATION:
|
||||||
|
|
||||||
The error messages for each temporal restrictions can also be globally overridden by
|
The error messages for each temporal restrictions can also be globally overridden by
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user