ghempton/state_manager — pull request #2 by wikyd (2013-09-01 19:23:13+00:00)
Title: Namespace queries in ActiveRecord scopes.

Complicated queries where you chain scopes can run into an issue where this scope generates ambiguous SQL. Name spacing the columns solves this.