Hi, I''m new to Ruby, Rails and this forum... so bear with me, thx. I have kind of a strange problem... I got a decimal field in a mysql table (precision 3, scale 1) for numbers like: "12", or "12.4"; Problem is, whenever I input "0.5" as a number, rails stores "5.0" in the db... Even when I edit the db by hand, it displays "5." ? I just don''t get what''s going on. Do u got any ideas? dertoni -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dertoni Dertoni wrote:> > Hi, > > I''m new to Ruby, Rails and this forum... so bear with me, thx. > > I have kind of a strange problem... > > I got a decimal field in a mysql table (precision 3, scale 1) for > numbers like: "12", or "12.4"; Problem is, whenever I input "0.5" as a > number, rails stores "5.0" in the db... > Even when I edit the db by hand, it displays "5." ? > > I just don''t get what''s going on. Do u got any ideas? > > dertoniMaybe your problem is related to localization issues. Are you using some localization plugins, such as Globalize or any other? You should see the content of log/development file to find how Rails is writing the SQL commands. Then you''ll have a hint of what is happening... Anyway, check if you are using the latest version of Rails... Good luck, Rodrigo. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Rodrigo, I''m using the Netbeans 6.0 Beta with the Ruby environment they provide with their ruby kit. Looking at the version numbers, almost everything is up-to-date, except Ruby which is a 1.8.5 (although it''s the JRuby variant not native Ruby). So I decided, to get the "original" and got Rails through Gems natively. So now, Ruby is at 1.8.6 and Rails still up-to-date, but obtained in another way than before, and guess what: Now it''s all working. So I guess something in Suns Distribution is still wonky... Well thanks for the hints ;-) dertoni -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dertoni Dertoni wrote:> > Hi Rodrigo, > > I''m using the Netbeans 6.0 Beta with the Ruby environment they provide > with their ruby kit. Looking at the version numbers, almost everything > is up-to-date, except Ruby which is a 1.8.5 (although it''s the JRuby > variant not native Ruby). > So I decided, to get the "original" and got Rails through Gems natively. > So now, Ruby is at 1.8.6 and Rails still up-to-date, but obtained in > another way than before, and guess what: Now it''s all working. So I > guess something in Suns Distribution is still wonky... > Well thanks for the hints ;-) > > dertoniYou''re welcome! :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---