Source

RubyLearning / ProjectTrak / vendor / rails / actionpack / test / fixtures / test / update_element_with_capture.erb

Full commit
1
2
3
4
5
6
7
8
9
<% replacement_function = update_element_function("products", :action => :update) do %>
  <p>Product 1</p>
  <p>Product 2</p>
<% end %>
<%= javascript_tag(replacement_function) %>

<% update_element_function("status", :action => :update, :binding => binding) do %>
  <b>You bought something!</b>
<% end %>