This project is archived and is in readonly mode.

#2377 ✓resolved
Simon St.Laurent

time scaffolding uses datetime_select, stores as time

Reported by Simon St.Laurent | March 30th, 2009 @ 05:20 PM | in 3.0.2

In Rails 2.3.2,

script/generate scaffold tester birthday:date favorite_time:time

rake db:migrate

script/server

Then visit http://localhost:3000/testers/.

>

The scaffolding will use datetime_select to represent the time, but won't store the date information. The odd result is that the user is asked for and shown the date, but that information isn't real - it's always 1/1/2000.

Previous versions of Rails also showed and asked for the date when they generated scaffolding for time data, but didn't throw it away. The scaffold generation needs to shift to time_select to match the expectations of the underlying datatype.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages