elabs/pundit — pull request #102 by viceversus (2014-01-31 02:04:16+00:00)
Title: Ensure pundit with more specificity

Ensuring policies can specify classes

If you have `authorize` or `policy_scope` calls happening twice in any
controller action, it does not ensure that the 2nd one is called. You might
care, you might not. This pull request adds code that allows you to specify
what classes you want `authorize` or `policy_scope` to be called on. It should
not break existing code.

``` ruby
class ApplicationController < ActionController::Base
after_filter(except: index) { |c| c.verify_authorized(Post, ArticleTag) }
after_filter(only: index) { |c| c.verify_policy_scoped(Post, Comment) }
end
```