This project is archived and is in readonly mode.

#438 ✓invalid
Mike Vincent

Updating Date field recasts value as Time instead of Date

Reported by Mike Vincent | June 17th, 2008 @ 05:18 PM

After upgrading to 2.1 I noticed some odd behavior with a date type attribute on one of my models. After some investigation I found that after doing an update_attributes or update_attribute affecting the date field, I got a Time type value back.

irb(main):002:0> f.charge_start_date.class

=> Date

irb(main):003:0> f.update_attribute(:charge_start_date, Date.tomorrow)

=> true

irb(main):004:0> f.charge_start_date.class

=> Time

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>

People watching this ticket

Pages