Commit b4217500 authored by Marin Jankovski's avatar Marin Jankovski

Call store_location_for once.

parent 9714061b
class SessionsController < Devise::SessionsController class SessionsController < Devise::SessionsController
def new def new
if request.referer.present? redirect_url = if request.referer.present?
referer_uri = URI(request.referer) referer_uri = URI(request.referer)
if referer_uri.host == Gitlab.config.gitlab.host if referer_uri.host == Gitlab.config.gitlab.host
store_location_for(:redirect, referer_uri.path) referer_uri.path
else else
store_location_for(:redirect, request.fullpath) request.fullpath
end end
else else
store_location_for(:redirect, request.fullpath) request.fullpath
end end
store_location_for(:redirect, redirect_url)
super super
end 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