fixed homepage redirect loop?
This commit is contained in:
parent
37455abfe9
commit
2db27ff15b
1 changed files with 5 additions and 2 deletions
|
@ -34,8 +34,11 @@ private
|
||||||
|
|
||||||
def require_user
|
def require_user
|
||||||
unless authenticated?
|
unless authenticated?
|
||||||
unless request.env["REQUEST_URI"] == root_url
|
|
||||||
store_location_for(:user, request.env["PATH_INFO"]) and redirect_to root_url
|
path = request.env["PATH_INFO"]
|
||||||
|
|
||||||
|
unless path == "/" || path == new_user_registration_path || path == new_user_session_path
|
||||||
|
store_location_for(:user, path) and redirect_to root_url
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue