theforeman/foreman — pull request #1297 by stbenjam (2014-03-14 09:40:35+00:00)
Title: fixes #4256 - makes columns sortable in the UI

Adds `counter_cache` to a bunch of models to make them sortable on has_many relationship counts. Also adds some other missing sorts in the UI.

Due to the way scoped_search works, the counts need to be retrievable from the DB. Are there downsides to using counter caches, which is why this was all in the controllers?