>
> 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.  Under
the native Rails engines implementation, its not possible (without some
hackery) to install the plugin routes last (or more specifically, wherever I
choose them to be installed).

I agree the place for this is in Rails core, but I wanted to get your take
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'
end

Then in the main routes file:

map.unbundle :my_bundle_name

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.

Comments welcome!
_______________________________________________
Engine-Users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to