Routes specified in engines

Hi,

Is there a place to specify special routes in an engine?

Thanks,
Peter

On 7/1/06, Peter M. [email protected] wrote:

Hi,

Is there a place to specify special routes in an engine?

I’ve been reading DHH’s recent blog post and slide show called “world
of resouces”. To hack the DELETE and PUT methods he uses something
like this in his routes

map.resources :person

This may mean as part of the install or update the routes.rb file must
be edited. MIght it be possible to have to add only one line inside
routes.rb when installing each engine. Something like

engine_resources ‘login_engine’
engine_resources ‘wiki_engine’

I don’t really know how the routes file works but I’d like to see
engines stay very easy to install or even get easier…would
something like this also be possible just for the regular routes we
have today?

Thanks,
Peter

We’ve looked into allowing the specification of routes from plugins,
and I think we can do it. However, doing this really is an expert user
feature only, since routes could quite easily clash between different
plugins or engines without any warning.

In other words, while this may be possible in the future, I wouldn’t
expect it to become common or as trivial to just drop in a bunch of
routing instructions as you’d hope…

  • james