Module: ActiveRecord::Calculations::ClassMethods
- Defined in:
- lib/fake_arel/calculations.rb
Instance Method Summary collapse
-
#calculate_with_fakearel(operation, column_name, options = {}) ⇒ Object
fix calculations to consider scoped :group.
Instance Method Details
#calculate_with_fakearel(operation, column_name, options = {}) ⇒ Object
fix calculations to consider scoped :group
5 6 7 8 9 10 11 |
# File 'lib/fake_arel/calculations.rb', line 5 def calculate_with_fakearel(operation, column_name, = {}) cur_scope = scope(:find) if ![:group] && cur_scope && cur_scope[:group] = .reverse_merge(cur_scope.slice(:group, :having)) end calculate_without_fakearel(operation, column_name, ) end |