Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
<%= 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 %>
<%= link_to_function "A link_to_function without insert_html", nil %>
You'll never see this page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>People: <%= controller.action_name %></title>
<%= javascript_include_tag :defaults %>
<p style="color: green"><%= flash[:notice] %></p>
<%= yield %>
<%= link_to_function "A nested link to insert a partial without a nested insert_html" do |page|
page.insert_html :top, :without_a_nested_insert_html, :partial => 'example_partial_without_nested_insert_html'
end %>
<div id="without_a_nested_insert_html">
<%= 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 %>
<div id="with_a_nested_insert_html">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.