Hey, is it possible to use replace_html together with a render :action? This is my code: render :update do |page| page.replace_html ''contentBody'', render(:action => ''new'') end and this is the confusing result in my contentBody: try { Element.update("contentBody", ""); } catch (e) { alert(''RJS error:\n\n'' + e.toString()); alert(''Element.update(\"contentBody\", \"\");'' ); throw e } Why doesn''t it work? Is there any alternative? It''s a bit tricky because: - I can''t redirect_to because I need the content in ''contentBody'' - I can''t render :action cause it wouldn''t know where to put the content (coming from a form_remote_tag) - I can''t use partials cause I need to use normal views Anyone any idea? Thanks in advance! -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
So from the view where you called this def you might have used link_to_remote or some thing like that..isn''t it? So add :update => "contentBody" to that Now in action just write render :action => ''new'' Sijo -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yep, I just figured out that :update was missing right after I posted that, thanks :) -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---