josevalim/inherited_resources — pull request #376 by petergoldstein (2014-09-29 18:25:30+00:00)
Title: Minimal fix for parent class issue.

This is a minimal fix for the parent class issue in the case of a namespaced controller and a non-namespaced model. It incorporates the spec provided in PR #369 , and that spec passes for this PR. The changes made are less extensive than #367 which seems to have a bit of controversy.

Essentially all this PR does is defer setting the `klass` variable until the code has confirmed that the constant corresponding to the newly namespaced class name exists. I'm hoping this will be a low-controversy alternative to #367 , and that we can expedite merging this PR. This is a blocking issue for ActiveAdmin, as discussed here - https://github.com/activeadmin/activeadmin/pull/3193