Production bug fix pundit
This commit is contained in:
parent
a75631552f
commit
0bcca5be87
@ -15,6 +15,14 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
private
|
||||
|
||||
def user_not_authorized
|
||||
flash[:alert] = 'Access denied.'
|
||||
redirect_to (request.referrer || root_path)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def flash_to_http_header
|
||||
return unless request.xhr?
|
||||
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
|
||||
end
|
||||
|
||||
def user_not_authorized
|
||||
flash[:alert] = 'Access denied.'
|
||||
redirect_to (request.referrer || root_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user