bouchard/thumbs_up — pull request #63 by f3ndot (2013-01-28 19:50:25+00:00)
Title: Tally totals without ordering

I've noticed that ```#plusminus_tally``` and ```#tally``` sorts the JOIN'd table and clobbers my preferred ordering (just efficiently JOIN the votes and totals and only sort by date DESC).

I wrote ```#with_plusminus``` and ```#with_votes``` for those who just want to take advantage of the efficient query to obtain the thumbs_up attributes without ordering anything.

So this now sorts only by created_at DESC:
```ruby
Post.with_plusminus.order('created_at DESC').map{|x|[x.created_at, x.plusminus]}
=> [[Thu, 17 Jan 2013 19:59:20 UTC +00:00, 0], [Sat, 08 Dec 2012 20:16:22 UTC +00:00, 0], [Tue, 27 Nov 2012 06:08:36 UTC +00:00, 0], [Tue, 27 Nov 2012 06:07:21 UTC +00:00, 1]]
```
Where, currently, this sorts by votes and clobbers my order call:
```ruby
Post.plusminus_tally.order('created_at DESC').map{|x|[x.created_at, x.plusminus]}
=> [[Tue, 27 Nov 2012 06:07:21 UTC +00:00, 1], [Thu, 17 Jan 2013 19:59:20 UTC +00:00, 0], [Sat, 08 Dec 2012 20:16:22 UTC +00:00, 0], [Tue, 27 Nov 2012 06:08:36 UTC +00:00, 0]]
```