Re: Renderer: rendering to *another* format inside a renderer

Marnen Laibow-Koser
Sat, 03 Jul 2010 18:44:26 -0000

Michael Schuerig wrote:
> My skeletal renderer looks like this
>
>   ActionController.add_renderer :pdf do |template, options|
>     html = render_to_string(template, options)
>     ...
>   end
>
> The trouble here is that render_to_string looks for a template for MIME
> type PDF, e.g. show.pdf.erb. Unfortunately, that''s not what I
want. I
> need to get HTML.

WTF?  What problem are you trying to solve that means you need to serve
HTML when a PDF file is requested?  I don''t see how that can ever be
the
right thing to do.


--
Marnen Laibow-Koser
http://www.marnen.org
marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org

Sent from my iPhone
--
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@googlegroups.com.