I have a class with a date. If the user doesn't change it in the view, Rails saves today's date (the default values in the drop downs). I would like it to be saved as a null value instead. How do I do this?
A:
You can use :include_blank
in your date_select
helper. Reference: http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#M002264
Brian
2010-07-22 19:19:29
Man you guys are quick and man am I stupid. Thanks a lot!
fiskeben
2010-07-22 19:23:16
No problem. Everybody needs to start somewhere - don't be so hard on yourself.
Brian
2010-07-22 19:28:38