So I have an action that results in atom:
def index
...
respond_to do |format|
...
format.atom { render :layout => false}
end
end
Then I have a builder template to render the atom, called
index.atom.builder.
Inside this builder template, I''d like to render one of my existing
html
partials, to put in the atom:content element, perfectly normal atom
thing to do.
xml.content :type => "text/html" do
xml.text! render(:partial => "my_thing")
end
The problem is that the template for my_thing is my_thing.html.erb. And
since we''re somehow in an xml ''context'', the render
call doesn''t find
it, it complains that no template could be found.
If I change it to render(:partial => "my_thing.html.erb"), it
works...
sort of. Because it turns out THAT partial calls OTHER partials, and all
of THOSE partial calls would also need to have ".html.erb" added to
them.
This is getting messy. Is there some better way to take care of this
that involves sweet-talking Rails instead of fighting with it?
--
Posted via http://www.ruby-forum.com/.
--
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.