David Kimura PRO said almost 7 years ago on Routing Partials :

The code will start to get messy. You wouldn't be able to simply extract out the routes into another file. You would have to still use the Rails.application.routes.draw, but then would also need to figure out how to not overwrite what you've already required. The method that I've demonstrated in this episode was fairly unobtrusive.


You could however, do something like this

config.paths["config/routes"] += Dir[Rails.root.join('config/routes/*.rb’)]

And it would probably have a similar effect, however, I don't think that it is as 'clean'.