sebarmano/loopoll — pull request #1 by cndreisbach (2014-06-29 19:04:35+00:00)
Title: Charts now show results

The key here was `includes` called on a Question's `results`. You can read about `includes` under [Eager Loading Associations in the Rails Guides](http://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations). By loading the answers for each result ahead of time, I could group on `answer`, not `answer_id`. This gave me a hash of answer => count when I called `.count` instead of answer_id => count.

Lastly, I made `to_s` on `Answer` give the content, so I wouldn't have to go through the hash and change each key to the content of that answer.

If this all makes sense, feel free to merge this. If you have questions, please post them on this pull request and I'll answer them when I have time.