gitlab-org--gitlab-foss/config/initializers/routing_draw.rb
Dmitriy Zaporozhets 41990128a3
Refactor project routing
* split on multiple files
* improve routing order

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-11-07 17:14:34 +02:00

7 lines
242 B
Ruby

# Adds draw method into Rails routing
# It allows us to keep routing splitted into files
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end