David Kahn
2010-Oct-27 20:10 UTC
"Missing partial layouts/application" error on render :partial => "index", :layout => "application" - Rails3
This is the second time I have seen this error, and been googling around and cant find an explanation. This error is happening with Rails 3/1.9.2 and was not with Rails 2.3.8/1.8.7: *Template is missing Missing partial layouts/application with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths "/Users/DK/Documents/ror/projects/creditcompare3/app/views"* This is the controller code below, and yes, I have verified that the layout application.html.erb exists. What I don''t understand is why it seems that Rails is demanding that the layout be a partial. I did try changing the application layout to a partial, and then in this case the page loads without the above error. But on normal non-partial renders, then of course I loose the application template. Makes no sense to have both application.html.erb and a partial _application.html.erb but this seems to be the only way I have found to hack around this error. Is there a new syntax I should be using instead? respond_to do |format| format.html { render :partial => "index", :layout => "application" } end Thanks much, David -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Possibly Parallel Threads
- Re: Train wreck getting render_to_string to work from foreign controller [SOLVED]
- Rails3: render_to_string of a .html.erb when request is a json request raises MissingTemplate error
- Anything special needed to migrate test::unit tests from Rails 2x to Rails3?
- mixing ebr and builder together and having it render as html in the browser
- Why is my rxml view being wrapped by the rhtml template in views/layouts?