Open dam13n opened 8 years ago
In my app I'm assigning transactions to a job. Then I try these methods (in app and in REPL have the same result):
Transaction.year_2016.where(:job).eq(job).sum(:amount) => 0.0 Transaction.year_2016.where(:job).eq(job).inject(0.0) { |sum, t| sum = sum + t.amount } => -104.75
If I relaunch the app, the .sum() works as expected.
In my app I'm assigning transactions to a job. Then I try these methods (in app and in REPL have the same result):
If I relaunch the app, the .sum() works as expected.