title: form_for wrong number of arguments (3 for 2) since upgrade to rails 3.1
body: <p>this form_for used to work before I ported my application to rails 3.1</p>
  
  <pre><code>&lt;div class="form-box" style="padding-left:1em;"&gt;
    &lt;%
       action = @existing_mass.nil? ? "add_to_power_plant": "update_power_plant_substrate";
       submit_button_label = @existing_mass.nil? ? 'Add': 'Update';
    %&gt;
  
    &lt;%= form_for :substrate_mass, @substrate_mass, :remote =&gt; true, :url =&gt; { :action =&gt; action, :substrate_id =&gt; @substrate_mass.substrate  } do |f| %&gt;
      &lt;div&gt;
        &lt;%= f.label :quantity_per_year, "Quantity" %&gt;
        &lt;%= f.text_field :quantity_per_year, :size =&gt; 5, :onclick =&gt; 'this.select();', :value =&gt; @substrate_mass.quantity_per_year %&gt;
      &lt;/div&gt;
  
      &lt;div class="actions" style="float:right;"&gt;
        &lt;%= f.submit submit_button_label %&gt;
      &lt;/div&gt;
      &lt;br/&gt; 
    &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have spent over 4 hours trying to figure out what's wrong ... there is definitely something I am not understanding anymore</p>
  
  <p>I get the error:</p>
  
  <p>wrong number of arguments (3 for 2)</p>
  
  <p>Note that I am trying to update an variable that is not an activerecord object. It's just an object that is not stored in the database. </p>
  
  <p>Hope someone can help. </p>
  
  <p>cheers</p>