kytrinyx/exercism.io — pull request #742 by Tonkpils (2013-09-09 06:28:46+00:00)
Title: Submission view count

This is my first attempt at adding the submission view count in reference to #740

First time messing around with mongo and this was the first way I thought of implementing this.

Another possible way of implementing this would be to create a new collection for `SubmissionViews` and associate it to the Submission and count the number of documents for submission. I'm not sure how much more performant that would be. It would've been a much easier if mongo behaved like redis on the `add_to_set` call and returned the number of inserted elements but oh well!

Let me know if there's anything I should fix/change or if there's a better approach?