Forum: Rails Engines Engine routes

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
18a4cfd669d998263f9824ed5efeab41?d=identicon&s=25 Michael Rigart (damick)
on 2010-08-01 17:51
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?
C2cf6f047cdb0590f03ad59a78181aa1?d=identicon&s=25 Matthew Crouch (mobilezilla)
on 2010-08-01 18:05
(Received via mailing list)
Hi Michael,

Try using this instead:

Rails::Application.routes.draw do

I am using this with RC1 and get no warnings.



On 1 Aug 2010, at 16:51, Michael Rigart wrote:

> ProjectName::Application instead, but also that you need to drop the
> _______________________________________________
> Engine-Users mailing list


Matthew Crouch

Telephone:    +44 (0) 7958 592 326
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

All email communications are recorded for monitoring purposes.
This topic is locked and can not be replied to.