Hi there,

I would like to integrate contents from a 3rd party content mangement
system into my rails app. The CMS has some web services which deliver
HTML that is ready to be displayed on the site, so no parsing or
processing is neccessary on the rails end.

Now, the amount of HTML can be quite large, so ideally I would like to
directly stream it to the client. I am able to stream text by using a
proc method like this:

output = proc { |response, output| output.write("CMS example content");
output.flush }
render :text => output

However, unfortunately this does not work with a layout:
render :layout => "application", :text => output

This renders the layout, but then instead of evaluating the proc method,
it is just converted to a string. The actual output is the string
representation of the proc object, e.g #<proc:0xec1...@d ...

How can I stream contents to a template/layout?

Thanks
Patrick
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to