Really use Rails 4.1 aggregation methods everywhere. - reportable - Fork of reportable required by WarVox, from hdm/reportable.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 9373bc0ac7971e3e80a3a9796b77acf30e2177d1
(DIR) parent face4321de33638ea07674c94fb8d1811a9a88c2
(HTM) Author: Martin Schürrer <martin@schuerrer.org>
Date: Wed, 9 Apr 2014 15:51:33 +0200
Really use Rails 4.1 aggregation methods everywhere.
Diffstat:
M lib/saulabs/reportable/cumulated_r… | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/lib/saulabs/reportable/cumulated_report.rb b/lib/saulabs/reportable/cumulated_report.rb
@@ -34,7 +34,7 @@ module Saulabs
def initial_cumulative_value(date, options)
conditions = setup_conditions(nil, date, options[:conditions])
- @klass.send(@aggregation, @value_column, :conditions => conditions)
+ @klass.where(conditions).calculate(@aggregation, @value_column)
end
end