Commit b4217500 authored by Marin Jankovski's avatar Marin Jankovski

Call store_location_for once.

parent 9714061b
class SessionsController < Devise::SessionsController
def new
if request.referer.present?
redirect_url = if request.referer.present?
referer_uri = URI(request.referer)
if referer_uri.host == Gitlab.config.gitlab.host
store_location_for(:redirect, referer_uri.path)
referer_uri.path
else
store_location_for(:redirect, request.fullpath)
request.fullpath
end
else
store_location_for(:redirect, request.fullpath)
request.fullpath
end
store_location_for(:redirect, redirect_url)
super
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment