Archive for February, 2008

Ruby: Displaying current date/time as default in text field

This is pretty basic stuff, but I couldn’t easily find the details on how to do it, so here it is for anyone else who is looking for it.
Scenario: I wanted to put the current date and time as the default text for the date field in a form.

The code:
In the form I used:
<p> [...]