这是一个简单的问题示例。
简而言之,如果你有一个 index.rhtml :
<%= 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 %>
还有一个 _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 %>
它打破了“使用嵌套的 insert_html 插入部分内容的链接”。我认为需要做一些事情来保护部分的javascript。
有什么想法吗?