Forum: Ruby on Rails how do I render a partial view into a string from inside a v

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Roberto S. (Guest)
on 2006-03-13 22:47
(Received via mailing list)
I want to pass the partial to a Javascript function ( which uses the
for for creating an iframe)

render_to_string is not accessible form a view

thanks in advance
Kevin O. (Guest)
on 2006-03-13 23:09
(Received via mailing list)
Call render_to_string in the controller and store the result in an
instance variable.  Supply the instance variable to the JS in the view.


use remote_function to call a method that renders the required template.

Roberto S. (Guest)
on 2006-03-13 23:24
(Received via mailing list)
Kevin, thanks very much

On 13 Mar 2006 21:07:02 -0000, Kevin O. <
This topic is locked and can not be replied to.