title: Rails: Form confirm message with data from the submitted form
body: <p>Trying to make a custom :confirm message for a rails form that returns data from the submitted form--not just a static string.</p>
  
  <pre><code>&lt;% form_for @foo do |f| -%&gt;
  &lt;% f.text_field :number_of_bars -%&gt;
  &lt;% f.submit :confirm =&gt; Are you really sure you want to use ##number_of_bars## bars? -%&gt;
  </code></pre>
  
  <p>The idea is if the user puts in the number 3 in the number of bars text field the confirm message would show up like this: "Are you really sure you want to use 3 bars?"</p>
  
  <p>Any ideas how to do this?</p>