I found change in rails default path for routes:
3.2:
Rails.application.config.paths[“config/routes”]
4.0:
Rails.application.config.paths[“config/routes.rb”]
This was introduced in https://github.com/rails/rails/commit/6acebb38bc0637bc05c19d87f8767f16ce79189b and later on removed (but without path change) in favor of https://github.com/rails/rails/compare/fa736e69a197…2d9dbf416b14
Multiple route files feature can be easly achived by:
config.paths[“config/routes”].concat(Dir[Rails.root.join(“config/routes/*.rb”)])
Now it need to be changed to:
config.paths[“config/routes.rb”].concat(Dir[Rails.root.join(“config/routes/*.rb”)])
which looks like something terribly wrong is going on - concatenating multiple files to path that is pointing to single file (routes.rb).
I’m wondering if this can be changed back and Rails could provide “official” way of supporting multiple route files just as posted above without any changes to existing DSL.
Let me know if this approach shouldn’t be used for any reason - it works for me for a long time without any problems.