Thanks Norm, Your second example is what I did (@accept_ratio.to_f = @no_quotes / @no_accepted_quote) so it did not work.
but when I changed it to how you showed inyour first example, it worked just fine. Thank you very much. Paul 2008/12/3 Norm <[EMAIL PROTECTED]>: > > Paul Jonathan Thompson wrote: >> Hi Norm, >> >> I am not sure how to do that. I have tried .to_f but that did not make >> any difference. >> >> Paul >> > When you say you tried .to_f do you mean you tried > > @accept_ratio = @no_quotes.to_f / @no_accepted_quotes.to_f > > It works for me. You only really need to convert either of the arguments. > > @accept_ratio.to_f = @no_quotes / @no_accepted_quotes will not work because > it will first evaluate to the integer 4 and then convert that to a float.... > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

