SCPR/SCPRv4 — pull request #178 by jcohenho (2014-01-30 19:42:36+00:00)
Title: Features/category blog association

This branch adds a blog association between Blogs and Categories and allows for the two most recent blog articles for a certain Vertical to be rendered in place of the 'Latest Headlines' section.

The current association is Category belongs_to Blog, but the nomenclature Blog has_one Category makes a little more sense to me, especially since I don't see a clear parent-child relation between them. Either way, the foreign key is put on the Category table.

I changed the content method in the Category model to allow for Sphinx to search any number of classes you pass it, as well as any conditional "with" parameters. One thing i'd like to go back and refactor is my checks for what kind of articles should be excluded from the Sphinx search. Right now you can pass in either a single article or an array of articles as an 'exclude' parameter, but i'd like to abstract that out into its own method outside of the content method.