AutoCommit Die Aug 4 22:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-04 22:03:01 +02:00
parent aa06d2195e
commit 9b1c35f499
7 changed files with 57 additions and 18 deletions

View File

@@ -36,7 +36,12 @@
if user_signed_in?
flash[:error] = "Not authorized to view this page"
session[:user_return_to] = nil
redirect_to root_url
respond_to do |format|
format.html {redirect_to root_url}
format.js {render text:"alert(\"Not authorized to do this\");", status: 401}
end
else
flash[:error] = "You must first login to view this page"