This project is archived and is in readonly mode.
[Patch] template missing with respond_to and namespaced controllers
Reported by Claudio Poli | May 7th, 2009 @ 02:40 PM | in 3.0.2
hi, since the rework contained in this commit:
http://github.com/rails/rails/co...
I had a couple issues, one of them is that rails is not able to find templates for rendering when using respond_to block.
Simple example on a namespaced controller:
class Administration::PatientsController < Administration::HomeController
def index
respond_to do |format|
format.html
# format.js do ...
end
end
Template is missing
Missing template patients/index - {:formats=>[:html, :xml, :text, :html, :all], :locales=>["it"]} - partial: false.erb in view path /Users/kain/Sites/careme/app/views
the view files are in the usual place:
app/views/administration/patients/index.html.erb
if not using the respond_to block it renders the page correctly.
Comments and changes to this ticket
-
Claudio Poli May 13th, 2009 @ 11:34 AM
- Tag set to edge, missing, template
added a trace here: http://pastie.org/474696
-
Claudio Poli May 13th, 2009 @ 12:08 PM
- Title changed from Template not found in edge to Template missing with respond_to and namespaced controllers
I tried to narrow down the problem.
http://github.com/rails/rails/blob/216309c16519d94a9e0aebf758029a78...
http://github.com/rails/rails/blob/216309c16519d94a9e0aebf758029a78...
keeping track of parts array I can see this (remember, namespaced controllers):
without respond_to block:
["index", {:locales=>[:en], :formats=>[:html, :xml, :text, :html, :all]}, "administration/patients"]with respond_to block:
["index", {:locales=>[:en], :formats=>[:html, :xml, :text, :html, :all]}, "patients"]as you can see the last item should be "administration/patients"
I'll investigate more on why this is happening, but if you have any idea it will be appreciated.
-
Claudio Poli May 15th, 2009 @ 10:49 AM
- Title changed from Template missing with respond_to and namespaced controllers to [Patch] template missing with respond_to and namespaced controllers
attached is a small patch that fixes the issue.
-
Uitek June 22nd, 2009 @ 12:55 AM
Claudio's patch fixed the issue for me, what do we need to do to get this released?
-
José Valim June 26th, 2010 @ 02:47 PM
- Assigned user set to José Valim
- Milestone cleared.
- Importance changed from to
-
Bruno Michel June 26th, 2010 @ 03:05 PM
I can't reproduce this bug on rails master. It seems like it has been fixed and the ticket can be closed.
-
José Valim June 26th, 2010 @ 03:27 PM
- State changed from new to resolved
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>