This project is archived and is in readonly mode.

#2726 ✓invalid
peter.tellgren (at gmail)

Layout not applied with "test" in controller name

Reported by peter.tellgren (at gmail) | May 27th, 2009 @ 02:07 PM | in 2.x

I ran in to this issue when I created a new Controller that I called TestReceiversController. The controller as normal inherits from the ApplicationController wherein I have the following.


layout 'layout'

The strange thing was that the layout was not used.. but the only thing I could do to solve it was to add the "layout 'layout'" in the controller itself.

The question is if this is a bug or a convention that the word test should never be used in a controller name unless it is for testing purposes?

Comments and changes to this ticket

  • CancelProfileIsBroken

    CancelProfileIsBroken May 27th, 2009 @ 10:20 PM

    • State changed from “new” to “invalid”

    Can't repro in 2.3.2: created a new rails app with a layout.html.erb layout, set that in application controller, scaffolded a new test_receiver resource, deleted the scaffold-generated layout for test_receiver, layout was properly inherited.

    My guess is that you have a test_receivers layout, which is overriding the application layout. If you can come up with exact repro steps or a failing test case we can take another look.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>