This project is archived and is in readonly mode.

#5466 ✓invalid
Chris Wise

Problem with value_before_type_cast

Reported by Chris Wise | August 26th, 2010 @ 12:19 PM

There was a recent change: http://github.com/rails/rails/commit/fb0bd8c1092db51888ec4bb72af6c5... in RC2.

to value_before_type_cast to not look first for a the method _before_type_cast and instead seeing if the object responds_to the base method_name.

This breaks things like time fields getting formatted value for the text_field helper etc.

I have a sample demo at git://git@github.com:cwise/time_bug.git. I apologize that I don't have this as a small Gist to demonstrate it with, but I am not sure how to isolate it down to that.

Comments and changes to this ticket

  • Chris Wise

    Chris Wise August 26th, 2010 @ 03:36 PM

    Close this ticket please. It would appear that I was using mysql (2.8.1) gem instead of mysql2. Apparently there is some behaviour with the way time fields are rendered because the before_type_cast returns a formatted time. I shouldn't have been expecting that text_field would render a time as a time.

  • Santiago Pastorino

    Santiago Pastorino August 26th, 2010 @ 05:13 PM

    • Importance changed from “” to “Low”

    Chris i'm unsure if i understand well your last comment. Why do you want to close it now? i haven't had time yet to take a look at this problem.
    But is an issue or not?, thanks.

  • Rohit Arondekar

    Rohit Arondekar December 12th, 2010 @ 02:28 AM

    • State changed from “new” to “invalid”

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>

Pages