Sha256: 52bc2f3e85a026c474ab6fc1401b860b0d39fc49e09e7cf32674ac6c282624cb
Contents?: true
Size: 587 Bytes
Versions: 15
Compression:
Stored size: 587 Bytes
Contents
module Carload class ApplicationController < ::ApplicationController include Pundit rescue_from Pundit::NotAuthorizedError, with: :rescue_not_authorized_error protect_from_forgery with: :exception private def rescue_not_authorized_error if Carload.auth_solution == :devise if user_signed_in? message = I18n.t("carload.error.message.#{params[:controller].split('/').last}_#{params[:action]}") redirect_to unauthorized_error_path(message: message) else authenticate_user! end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems