title: form_for with json return
body: <p>I currently have a form like this:</p>
  
  <pre><code>&lt;% form_for @stem, :html =&gt; {:multipart =&gt; true} do |f| %&gt;
  &lt;%= f.file_field :sound %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>This outputs (essentially):</p>
  
  <pre><code>&lt;form method="post" id="new_stem" class="new_stem" action="/stems"&gt;
  &lt;input type="file" size="30" name="stem[sound]" id="stem_sound"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>However I'm planning to use jQuery's ajaxForm plugin here and would like the new stem to be returned in JSON format. I know if the form's action was "/stems.json" this would work, but is there a parameter I can put into the form_for call to ask it to return JSON?</p>
  
  <p>I tried doing</p>
  
  <pre><code>&lt;% form_for @stem, :html =&gt; {:multipart =&gt; true, :action =&gt; '/stems.json'} do |f| %&gt;
  </code></pre>
  
  <p>but this didn't appear to work.</p>