I'm in the process of upgrading a rails 3 app to rails 4.0.1.
In my rails 3 app I have the following code in the my application.rb
to use multiple route files.
config.paths["config/routes"] += Dir[Rails.root.join('config', 'routes', '*.rb').to_s]
but that throws an exception when I try to use the same thing in rails 4.
Any tips?
In one of my larger applications I use the following segment of code inside of my config/routes.rb file.
Rails 4 initially had support for
draw :routeName
but it was removed as it did not show any improvements. (I dont know ^.^) You can check out the git commit doing so here: https://github.com/rails/rails/commit/5e7d6bba79393de0279917f93b82f3b7b176f4b5Check out this SO answer: rails 4: split routes.rb into multiple smaller files
Looks like this ability was deprecated in Rails 4.
I don't know how big your application is. But you should look into routing concern in rails 4, if you need some proper refactoring with Rails route.
Mo' files, mo' problems.