assemblymade/coderwall — pull request #44 by Mileshosky (2014-07-10 20:40:48+00:00)
Title: Check if protip owner is banned before indexing.

**Problem:** Banned user protips were making their way back into the search index somehow.

**Culprit:**
The search:sync task reindexes any protips that aren't found in the search index. https://github.com/assemblymade/coderwall/blob/master/lib/tasks/search.rake#L93-L95
This had the effect of pulling in any protips that we had possibly deindexed on purpose (a user is banned).

**Solution:**
I chose the simplest method possible to ensure a user's tip is not reindexed again by adding the check to the IndexProtip job. This will ensure that anytime we use the IndexProtip job, it accounts for a banned user.