Roberto Saccon
2006-Mar-13 20:41 UTC
[Rails] how do I render a partial view into a string from inside a view ?
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 -- Roberto Saccon - http://rsaccon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060313/8165bcec/attachment.html
Kevin Olbrich
2006-Mar-13 21:07 UTC
Re: [Rails] how do I render a partial view into a string from inside a view ?
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 On Monday, March 13, 2006, at 5:40 PM, Roberto Saccon wrote:>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 >-- >Roberto Saccon - http://rsaccon.com > > >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/rails >-- Posted with http://DevLists.com. Sign up and save your time!
Roberto Saccon
2006-Mar-13 21:21 UTC
[Rails] how do I render a partial view into a string from inside a view ?
Kevin, thanks very much On 13 Mar 2006 21:07:02 -0000, Kevin Olbrich < devlists-rubyonrails@devlists.com> wrote:> > 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 > > > On Monday, March 13, 2006, at 5:40 PM, Roberto Saccon wrote: > >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 > >-- > >Roberto Saccon - http://rsaccon.com > > > > > >_______________________________________________ > >Rails mailing list > >Rails@lists.rubyonrails.org > >http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > -- > Posted with http://DevLists.com. Sign up and save your time! > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Roberto Saccon - http://rsaccon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060313/4d44dfa6/attachment.html