# Routes specified in engines

**URL:** <https://www.ruby-forum.com/t/routes-specified-in-engines/96812>\
**Category:** Engines\
**Created:** [July 2, 2006, 7:31am UTC](https://www.ruby-forum.com/t/routes-specified-in-engines/96812 "2006-07-02T07:31:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dracos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dracos](https://www.ruby-forum.com/u/dracos)\
**Post date:** [July 2, 2006, 7:31am UTC](https://www.ruby-forum.com/t/routes-specified-in-engines/96812/1 "2006-07-02T07:31:34Z")

</div>

Hi,

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

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![dracos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dracos](https://www.ruby-forum.com/u/dracos)\
**Post date:** [July 3, 2006, 7:19am UTC](https://www.ruby-forum.com/t/routes-specified-in-engines/96812/2 "2006-07-03T07:19:48Z")

</div>

On 7/1/06, Peter M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![dracos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dracos](https://www.ruby-forum.com/u/dracos)\
**Post date:** [July 3, 2006, 9:15am UTC](https://www.ruby-forum.com/t/routes-specified-in-engines/96812/3 "2006-07-03T09:15:11Z")

</div>

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
