objects-on-rails/display-case — pull request #32 by leemhenson (2013-01-17 12:16:21+00:00)
Title: Fully-qualify path to Rails constant

Hi.

We've recently had some display-case freakiness since starting to use object_is_any_of? in development env, and it turns out that the correct comparator was not being used because the Rails constant wasn't being detected accurately.

Next up, our Rails (3.2.11) doesn't respond to "config", so now that the correct path was being followed in class_comparator, it was erroring out. I've added a respond_to? check before falling back to Rails.application.config instead, and now DC is working as expected.

Is there some subtlety around using Rails.config vs Rails.application.config that I'm not aware of? I presume it's there for backwards compatibility.