Skip to content

Instantly share code, notes, and snippets.

View guy-roberts's full-sized avatar

Guy Roberts guy-roberts

  • Nottingham, UK
View GitHub Profile
class ApplicationController < ActionController::Base
include Pundit
# Verify that controller actions are authorized. Optional, but good.
after_filter :verify_authorized, except: :index
after_filter :verify_policy_scoped, only: :index
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
private