I have a mistake that I cannot find a solution.
When I run:
Week.find(1).results.sum('box')
A get SUM column fields and it works great!
But when I apply a filter in it:
Week.find(1).results.find(:all, :joins => [:seller],:conditions => ['sellers.user_id = ?', 1]).sum('caixas')
I get an error NoMethodError: undefined method '+' for #<Result:0x103239e58>
The returned object is the same as me, I will print it on the console and do not see anything bad.
Does anyone know about this?
Tks!
source
share