elabs/pundit — pull request #190 by divoxx (2014-08-12 00:42:34+00:00)
Title: Changes policy lookup to look at controller's namespace and then fallback to model's namespace

This is related to #172

Basically, if your model lives inside a namespace that would not be considered when falling back when looking up for the policy.

With this change, if one had a controller `Api::V1::Foo::Bar` and a model `Foo::Bar`, when looking for the policy it would try `Api::V1::Foo::BarPolicy` and then `BarPolicy`. Now it will look for `Foo::BarPolicy`.