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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
30269682335f1fb247d71969fa715b5e?d=identicon&s=25 Roberto Saccon (rsaccon)
on 2006-03-13 21:47
(Received via mailing list)
I want to pass the partial to a Javascript function ( which uses the
data
for for creating an iframe)

render_to_string is not accessible form a view

thanks in advance
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-03-13 22: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.

or....

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

_Kevin
30269682335f1fb247d71969fa715b5e?d=identicon&s=25 Roberto Saccon (rsaccon)
on 2006-03-13 22:24
(Received via mailing list)
Kevin, thanks very much

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