elabs/pundit — pull request #45 by randoum (2013-07-28 06:59:42+00:00)
Title: Allow to use custom scope other than default Scope#resolve

The default behaviour is maintain, and `policy_scope(Class)` will call `ClassPolicy::Scope#resolve`

This add the possibility to create additional scopes `ClassPolicy::Scope#my_scope` for example, and call them with `policy_scope(Class, :my_scope)`

If the named scope is not defined i.e when calling `policy_scope(Class, :wrong_name)`, a NoMethodError is raised