sunspot/sunspot — pull request #622 by doughsay (2014-09-23 23:10:18+00:00)
Title: Features/allow namespaced models

Hi,

I ran into issues with using namespaced classes with this gem and traced it down to the usage of `.name` everywhere throughout this project. That doesn't seem so good to me, since a class such as `Foo::Bar` will be indexed and serialized to Solr as `"Bar "` and then later when pulling it out it will try `"Bar".constantize` and fail.

I attempted a fix here by using `.to_s` on the classes instead. I haven't run into any issues using this in my project, but I couldn't get the tests to run quite right. I couldn't even get them to run properly on a clean master branch.

Comments and concerns?