Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

MissingTemplate - html layout file is required

#4800

I don't have an application layout file and I have a handful of controllers that are rjs only. When my tests run I see errors like this:

ActionView::MissingTemplate: Missing layout layouts/application with {:handlers=>[:rhtml, :prawn_dsl, :prawn, :rxml, :erb, :builder, :prawn_xxx, :rjs], :formats=>[:js], :locale=>[:en, :en]} in view paths "/home/darren/drfunk/app/views", "/home/darren/drfunk/vendor/plugins/prawnto/app/views"

app/controllers/features_controller.rb:7:in `create'
/test/functional/features_controller_test.rb:18:in `test_create_ajax'

For this example, if I create an empty layout file called features.html.erb, or application.html.erb, the problem goes away. Although its confusing, it's not a difficult fix.

Why would a rjs action require an html layout? Is this a bug?

Reported by Darren Hinderer · June 8th, 2010 @ 08:34 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Neeraj Singh
    Neeraj Singh

    Can you post your test as well as your controller code so that I could take a look.

    June 9th, 2010 @ 04:49 AM

  2. Darren Hinderer
    Darren Hinderer

    Thanks Neeraj. I created a new project and couldn't reproduce the issue. Then I took a closer look at the stack trace and seems like the culprit may be the prawnto plugin. I'll try to close this ticket.

    June 9th, 2010 @ 05:49 PM

  3. Darren Hinderer
    Darren Hinderer

    Doesn't look like I can close it myself.

    June 9th, 2010 @ 05:50 PM

  4. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to invalid

    June 10th, 2010 @ 02:10 AM