diff options
Diffstat (limited to 'lib/gitlab/patch/draw_route.rb')
-rw-r--r-- | lib/gitlab/patch/draw_route.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/patch/draw_route.rb b/lib/gitlab/patch/draw_route.rb index f8ae6f7afc0..c7a0b49a948 100644 --- a/lib/gitlab/patch/draw_route.rb +++ b/lib/gitlab/patch/draw_route.rb @@ -13,11 +13,15 @@ module Gitlab end def draw_ce(routes_name) - draw_route(Rails.root.join("config/routes/#{routes_name}.rb")) + draw_route(route_path("config/routes/#{routes_name}.rb")) end def draw_ee(routes_name) - draw_route(Rails.root.join("ee/config/routes/#{routes_name}.rb")) + draw_route(route_path("ee/config/routes/#{routes_name}.rb")) + end + + def route_path(routes_name) + Rails.root.join(routes_name) end def draw_route(path) |