rails/rails — pull request #15334 by brocktimus (2014-05-26 14:18:39+00:00)
Title: Add support for Arel Nodes + Attributes as column_name arguments in ActiveRecord::Calculations

The `select` method on an ActiveRecord::Relation allowed for Arel nodes whilst methods from calculations such as pluck did not. Now they are also valid arguments in place of any column name in ActiveRecord::Calculations.

I dislike how I'm checking for subclasses of Arel::Nodes::Node and the code duplication. I should note that it is possible to pass in Arel::Nodes::Node subclasses that just don't make sense, but I just considered that the API users responsibility.

In general I'm more happy with the pluck half of it than the calculations, hence the separate commits.

If whole thing seems fine then I'll squash and rebase. The other CHANGELOG I updated was one of my own.