Thanks for the answers - This solved my problem partly. In database (mysql) the number is a decimal - but for some reason it seems to be an integer in rails if it's decimals are zeros.
Janne On 30 maalis, 12:30, Frederick Cheung <[email protected]> wrote: > On Mar 30, 9:21 am, JanneKo <[email protected]> wrote: > > > Hi, > > > I have a strange problem with number rounding: > > If I try "a_number.round(2)" in console - it works, but the same line > > thru passenger fails: "wrong number of arguments (1 for 0)". > > Any ideas why? > > Is a_number an integer ? > rails overrides round to allow it to take a precision argument, but it > only does that on Float - Integers still have the standard round > method, which does not take a precision argument. > > Fred > > > > > I'm running rails 2.3.4 and passenger 2.2.9 -- 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.

