This project is archived and is in readonly mode.
MissingTemplate - html layout file is required
Reported by Darren Hinderer | June 8th, 2010 @ 08:34 PM
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?
Comments and changes to this ticket
-
Neeraj Singh June 9th, 2010 @ 04:49 AM
Can you post your test as well as your controller code so that I could take a look.
-
Darren Hinderer June 9th, 2010 @ 05:49 PM
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.
-
Santiago Pastorino June 10th, 2010 @ 02:10 AM
- State changed from new to invalid
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>