diff options
author | digitalMoksha <bwalker@gitlab.com> | 2017-11-21 15:29:57 +0300 |
---|---|---|
committer | digitalMoksha <bwalker@gitlab.com> | 2017-11-21 15:29:57 +0300 |
commit | cba68d338bfac97baab153d38fa63b85a27f6d19 (patch) | |
tree | de944b269071ff7b75970e84783b80d4095e58a4 /lib/gitlab/middleware | |
parent | 3c52e2f06ef3234ab5ace532e21e194abab96b59 (diff) |
use `Gitlab::Routing.url_helpers` instead of `Rails.application.routes.url_helpers`
since `Rails.application.routes.url_helpers` creates a new anonymous module every time it's called
Diffstat (limited to 'lib/gitlab/middleware')
-rw-r--r-- | lib/gitlab/middleware/read_only.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/middleware/read_only.rb b/lib/gitlab/middleware/read_only.rb index dc77f737da8..c26656704d7 100644 --- a/lib/gitlab/middleware/read_only.rb +++ b/lib/gitlab/middleware/read_only.rb @@ -58,7 +58,7 @@ module Gitlab end def last_visited_url - @env['HTTP_REFERER'] || rack_session['user_return_to'] || Rails.application.routes.url_helpers.root_url + @env['HTTP_REFERER'] || rack_session['user_return_to'] || Gitlab::Routing.url_helpers.root_url end def route_hash |