RichardOnRails wrote: > I just created a new CRUD "expense" (using Rails 2.3.5 scaffold) which > included "amount:decimal". When I: > > 1. populated the amount field of a new expense with 5 characters: > 12.50 and > 2. saved the new record > > I got a display of the new record that showed Amount to be merely > "12". > > I clicked Update and put my cursor over the data field for Amount and > got a tool-tip display of 12.50. > > On the other hand, Date seems to be handled fine IMHO, both on input > and display. > > Is the problem that MySQL 2.0.37 doesn't really implement "decimal" > and so I should switch to float and then do my own formatting for a > text field?
MySQL 2.0.37? Wow! I'm shocked that's even useable with Rails, or anything else modern. That being said I assume you added the :precision and :scale for the field to your migration? If so then yes, you might have issues with that old of a version of MySQL. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

