gregbell/active_admin — pull request #3193 by petergoldstein (2014-06-03 21:13:35+00:00)
Title: Fix compatibility with Inherited Resources 1.5.x

Specs (and app behavior) were failing for the belongs_to association in a Controller. This was failing because Inherited Resources was no longer inferring the parent_class from the parameters passed in (as it was in 1.4.1). So when find was called on the parent_class, this was resulting in a NPE.

I fixed this by doing this inference ourselves, classifying and then constantizing the belongs_to :target. Unfortunately this means that if the target name is not a class name, then the parent_class will need to be explicitly set.

I'm not 100% sure this is the right fix - I'd love to get some other opinions.