I have two templates for the show action (show.rhtml and show.rxml).
If I specify the format in the URL (/posts/1.xml) the show.rxml
templates gets rendered with the current layout. Problem would be solved
if I could disable the layout for a specific format, but seems that its
not possible.
I am having the same problem - did you find a solution to this?
Ingo
Eduardo D. wrote:
'm using resources.
I have two templates for the show action (show.rhtml and show.rxml).
If I specify the format in the URL (/posts/1.xml) the show.rxml
templates gets rendered with the current layout. Problem would be solved
if I could disable the layout for a specific format, but seems that its
not possible.
I have two templates for the show action (show.rhtml and show.rxml).
If I specify the format in the URL (/posts/1.xml) the show.rxml
templates gets rendered with the current layout. Problem would be solved
if I could disable the layout for a specific format, but seems that its
not possible.
how about?
def show
show method contents here
respond_to do |format|
format.html
format.xml { render :action => “show.rxml”, :layout => false }
end
end