This project is archived and is in readonly mode.
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
-
Mike Vincent June 18th, 2008 @ 04:14 AM
Never mind, it must be something in my app. I don't know what yet, but I tried to reproduce it on a fresh rails app and can not.
-
Geoff Buesing June 18th, 2008 @ 05:55 PM
- State changed from new to invalid
- Milestone cleared.
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>