What's the base type in your model? You *can't* put a float in an integer.
It's being nice to you and truncating (whether it's AR or your database engine I've no idea). Thanks and regards, Francis On Mon, May 11, 2009 at 11:00 AM, 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 -~----------~----~----~----~------~----~------~--~---
