If the community feels that controlling the positioning of the routes
is necessary, we should be pursuing this as part of the Rails core
implementation, i.e. with tickets and patches and +1s.
I have a use-case for needing a catch-all route from a plugin/engine.
the native Rails engines implementation, its not possible (without some
hackery) to install the plugin routes last (or more specifically,
choose them to be installed).
I agree the place for this is in Rails core, but I wanted to get your
on my idea of providing a “bundling” and unbundling of routes.
i.e. from a plugin’s routes file:
ActionController::Routing::Routes.bundle(:my_bundle_name) do |map|
map.connect ‘*path’, :controller => ‘whatever’
Then in the main routes file:
You could have multiple bundles defined and “stored”, which get inserted
wherever you choose in the main routes file. I guess this is a lot like
map.from_plugin, but it allows for finer grained “chunks” of routes.