Strategies for managing routes file in Rails with controllers provided by a package

This message was imported from the Ruby/Rails Modularity Slack server. Find more info in the import thread.

Message originally sent by slack user U70MEM0MPN4

How are folks dealing with the routes file? I’d like to think that our controllers, provided via a package, also holds the routing path information on how to route to that controller within the package. Obviously, with Rails routes being string representation mappings to classes it wouldn’t be easy (or even worth it) to enforce with Packwerk. Thoughts?

Gusto owns and maintains stimpack, which allows you to split routes up across packages: https://github.com/rubyatscale/stimpack#splitting-routes

Message originally sent by slack user U70MEM0MPN4

Thanks, will take a look at this.

Let me know what ya think!