Could someone please tell me how to escape the ‘division’ arithmetic

symbol in a model or controller? I’ve searched around and cannot find a

solution.

I’ve got the following in my model:

def avg_risk

t = 0

self.audits.each{|key| t = t + key.control_rating }

t = t / self.audits.count #this line doesn’t work… I’ve even tried

/

return t

end

Any help would be appreciated.