# Engine routes

**URL:** <https://www.ruby-forum.com/t/engine-routes/192536>\
**Category:** Engines\
**Created:** [August 1, 2010, 5:51pm UTC](https://www.ruby-forum.com/t/engine-routes/192536 "2010-08-01T17:51:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e7dd6/32.png) [@roa](https://www.ruby-forum.com/u/roa)\
**Post date:** [August 1, 2010, 5:51pm UTC](https://www.ruby-forum.com/t/engine-routes/192536/1 "2010-08-01T17:51:39Z")

</div>

Hi all,

I have a small question regarding Rails 3 / engines en routes file.

At this point, I start my routes file with the following line:

Rails.application.routes.draw do |map|

But, since Rails 3 RC 1, I got deprecation warnings in my app saying  
that Rails.application will become deprecated, using  
ProjectName::Application instead, but also that you need to drop the  
|map| parameter.

Now, that is in a project, but what about engines? Since engines are  
small sub applications that can be used in multiple apps, you can’t just  
use Projectname::Application.

Any comments on this issue?

---

<div class="post-metadata">

**Author:** ![roa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e7dd6/32.png) [@roa](https://www.ruby-forum.com/u/roa)\
**Post date:** [August 1, 2010, 6:05pm UTC](https://www.ruby-forum.com/t/engine-routes/192536/2 "2010-08-01T18:05:24Z")

</div>

Hi Michael,

Try using this instead:

Rails::Application.routes.draw do

I am using this with RC1 and get no warnings.

Cheers

Matt

On 1 Aug 2010, at 16:51, Michael R. wrote:

> ProjectName::Application instead, but also that you need to drop the
> 
> * * *
> 
> Engine-Users mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org)

–

Matthew Crouch  
Mobilezilla

Telephone: +44 (0) 7958 592 326  
Email: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Web: [http://www.mobilezil.la](http://www.mobilezil.la)  
Skype: mobilezilla

Please consider the environment before printing out this email.

The contents of this email are confidential to the addressee  
and are intended solely for the recipients use. If you are not  
the addressee, you have received this email in error.  
Any disclosure, copying, distribution or action taken in  
reliance on it is prohibited and may be unlawful.

Any opinions expressed in this email are those of the author  
personally.

All email communications are recorded for monitoring purposes.
