The :group option is broken for multiple fields when performing
an AR calculation. See the example below:
Account.count(:all, :group => 'firm_id, credit_limit') # returns <OrderedHash {60=>1, 55=>1, 50=>1, 53=>1}>
The example above demonstrates that the returned hash
incorrectly excludes data rows and columns. See below for the
expected return value:
Account.count(:all, :group => 'firm_id, credit_limit') # should return <OrderedHash {[2, 60]=>1, [nil, 50]=>1, [9, 53]=>1, [6, 55]=>1, [1, 50]=>1, [6, 50]=>1}>
I have a attached a patch (test included) for supporting
grouping by multiple fields. The behavior for grouping by a single
field or an association is unchanged. Also, the :group option still
takes in a string as always.