Topic: Nested link_to_function/insert_html does not work

Here is a simple example of the problem.

http://gist.github.com/235729

In short, if you have a index.rhtml with:

<%= link_to_function "A link to insert a partial with nested insert_html" do |page|
      page.insert_html :top, :with_a_nested_insert_html, :partial => 'example_partial_with_nested_insert_html'
    end %>

And a _example_partial_with_nested_insert_html.rhtml

<%= link_to_function "A nested link to insert_html" do |page|
      page.insert_html :top, :with_a_nested_insert_html, :partial => 'you_wont_see_this'
    end %>

It breaks the "A link to insert a partial with nested insert_html". I am thinking something needs to be done to protect the javascript in the partial.

Any thoughts?

Re: Nested link_to_function/insert_html does not work

actually same trouble. Did you find a workaround?

http://railsforum.com/viewtopic.php?pid=112811#p112811

Last edited by Pasta (2009-11-19 18:27:57)