rails/rails — pull request #13585 by ccutrer (2014-01-03 22:55:52+00:00)
Title: support multiple calculations in a single query

to reduce code duplication of looping over the multiple operations, execute_simple_calculation and execute_grouped_calculation were combined. calculating and selecting on the group is skipped by an if in the function, and the final loop short-circuits out of constructing the hash for the simple case by just returning