Displaying 1 result from an estimated 1 matches for "default_time_from_opt".
2008 Mar 17
0
Nil dates in selct_date
...y to date_select that a nil value is permitted and is the
default value? Is it possible to add nil to the list of permitted
values in a date_select call? The code in
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/date_helper.rb
seems to treat nil as now.
654 def default_time_from_options(default)
655 case default
656 when nil
657 Time.now
658 when Date, Time
659 default
I have a situation where a record may have a superseded date but which
is left as null if the date is not set. It is also possi...