Pundit policy_scope error: undefined method `admin?' for nil:NilClass
问题 Running into something I don't understand with Pundit, Using Rails 4.2.5.1, Pundit 1.1.0 with Devise for authentication. I'm trying to use a policy scope for the BlogController#Index action. If user is admin, display all posts (drafts, published) If user is standard, display posts marked published only If no user / user not logged in, display posts marked published only Getting an error: undefined method `admin?' for nil:NilClass Live shell reveals: >> user => nil # ApplicationController