Sha256: e51112404ce5006f3d8a12bc0422d7101f0e34ef3b4cbcc3eaa5bb48ba142f44
Contents?: true
Size: 417 Bytes
Versions: 2
Compression:
Stored size: 417 Bytes
Contents
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception helper ::Dorsale::AllHelpers before_action :authenticate_user! rescue_from Pundit::NotAuthorizedError do |e| raise e if Rails.env.test? flash[:alert] = "Not authorized." redirect_to "/" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dorsale-3.1.1 | spec/dummy/app/controllers/application_controller.rb |
dorsale-3.1.0 | spec/dummy/app/controllers/application_controller.rb |