I just tried this in a 2.2.2 app and it does the same thing, model has value
12.

Cheers
Steve


2009/5/11 [email protected] <[email protected]>

>
> I'm pretty sure that's not something that has changed in 2.3.2.
>
> Using your example, when it comes to redisplaying user input that
> hasn't passed validation, the form builder calls
> 'position_before_type_cast' so the user _will_ see "12.34" rather
> "12".
>
> Paul
>
> On 11 May, 11:00, doug livesey <[email protected]> wrote:
> > Hi -- has anyone else noticed (or am I really late noticing) that there's
> a
> > bug in ActiveRecord in Rails 2.3.2?
> > I have an integer field (called position), and when I try to set it to
> the
> > value "12.34", it actually only sets to 12 in the model instance.
> > I would expect that it should store the value "12.34" in the model
> instance,
> > and rely on validations to catch the formatting error.
> > Certainly that is what you would expect for a form to redisplay with
> > erroneous input for the user to correct.
> > Or am I tripping?
> > Has anyone else run into this?
> > Cheers,
> >    Doug.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NWRUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nwrug-members?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to