Production bug fix pundit

This commit is contained in:
Jesse C. Fisher 2015-11-07 18:30:45 -08:00
parent a75631552f
commit 0bcca5be87

View File

@ -15,6 +15,14 @@ class ApplicationController < ActionController::Base
private private
def user_not_authorized
flash[:alert] = 'Access denied.'
redirect_to (request.referrer || root_path)
end
end
private
def flash_to_http_header def flash_to_http_header
return unless request.xhr? return unless request.xhr?
return if flash.empty? return if flash.empty?
@ -22,9 +30,4 @@ class ApplicationController < ActionController::Base
flash.discard # don't want the flash to appear when you reload page flash.discard # don't want the flash to appear when you reload page
end end
def user_not_authorized
flash[:alert] = 'Access denied.'
redirect_to (request.referrer || root_path)
end
end
end end