Derek Haynes
2006-Jan-13 04:17 UTC
[Rails] Rendering an RJS template within another RJS template
Is there a way to render an RJS template within another? I''ve put my simplified code below. No errors are generated, but the partial isn''t rendered. I also tried using render :action => ''update_actions'' destroy.rjs--- page.visual_effect :fade, comment_container(@object.id.to_s) # update the number of comments(below is another rjs template) render :partial => ''update_counts'' -- Derek Haynes HighGroove Studios - http://www.highgroove.com Atlanta, GA | San Mateo, CA Keeping it Simple. 404.593.4879
Tom Fakes
2006-Jan-13 08:38 UTC
[Rails] Rendering an RJS template within another RJS template
I think you''ll need to do it this way: page << render :partial => ''update_counts'' This will render the partial, take the output from that and add it to the current template output. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Derek Haynes Sent: Thursday, January 12, 2006 8:17 PM To: rails@lists.rubyonrails.org Subject: [Rails] Rendering an RJS template within another RJS template Is there a way to render an RJS template within another? I''ve put my simplified code below. No errors are generated, but the partial isn''t rendered. I also tried using render :action => ''update_actions'' destroy.rjs--- page.visual_effect :fade, comment_container(@object.id.to_s) # update the number of comments(below is another rjs template) render :partial => ''update_counts'' -- Derek Haynes HighGroove Studios - http://www.highgroove.com Atlanta, GA | San Mateo, CA Keeping it Simple. 404.593.4879 _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails