Craig White wrote: > Thanks - I see said the blind man... > > all I had to do was to first convert big decimal to float and then the > sprint function worked. > > @price.to_f.to_fl(2) and I get what I wanted in the view...
Your Float#to_fl method is unnecessary and has semantics that will confuse experienced Ruby programmers. Try @price.round(2).to_f. Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- 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 -~----------~----~----~----~------~----~------~--~---

