module PunditHelper

config/initializers/pundit.rb Extends the ApplicationController to add Pundit for authorization. Modify this file to change the behavior of a 'not authorized' error. Be sure to restart your server when you modify this file.

Private Instance Methods

user_not_authorized() click to toggle source
# File lib/generators/pages/authorized/templates/pundit.rb, line 15
def user_not_authorized
  flash[:alert] = "Access denied."
  redirect_to (request.referrer || root_path)
end