pat/thinking-sphinx — pull request #671 by jonsgreen (2013-12-15 11:01:32+00:00)
Title: Issue#668 Blank STI type blows up search with Postgres

Use combination of COALESCE and NULLIF to ensure that table rows with
blank string for type are cast to parent class

Note: I needed to use pg 0.15.1 to run specs and also got the following error while running specs:

ThinkingSphinx::SphinxError:
Using the old-fashion @variables (@count, @weight, etc.) is deprecated