Forum: Ruby on Rails datetime_select and preserving NULLs

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
66a5ac2e18f98ac8424c8bd0d49166b8?d=identicon&s=25 (Guest)
on 2007-01-03 08:53
(Received via mailing list)
I have several datetime columns and in my 'new' and 'edit' views
sometimes I would like to set a  specific date time while other times I
would like to leave it null. For the life of me I can't figure out what
I should be using in my _forms.rhtml so that datetime_select accepts a
NULL value for the datetime instead of a preset value. I've tried
setting the default value of the column to NULL or '0000-00-00
00:00:00' but to no avail.

I see there is an open defect on this issue: but was wondering if there was
an easy work around that someone could recommend.

This topic is locked and can not be replied to.