title: Rails update method for updating records not working
body: <p>I have two methods in <strong>PersonsController</strong>- edit and update and a <strong>Person</strong> model:  </p>
  
  <pre><code>def edit
    @person=Person.find(params[:id])
  end
  
  def update
      @person=Person.find(params[:id])
      @person.update_attributes(params[:person])
  end  
  </code></pre>
  
  <p>and my <strong>edit.html.erb</strong>:  </p>
  
  <pre><code>&lt;h2&gt; Edit info here!&lt;/h2&gt;
  &lt;%= @person.name %&gt;
  
  &lt;%= form_for @person, html: {mulitpart: true}  do |f| %&gt;
    &lt;p&gt;&lt;%= f.text_field :location %&gt;&lt;/p&gt;
    &lt;p&gt;&lt;%= f.submit :submit , class: "btn btn-large btn-success" %&gt;&lt;/p&gt;
  &lt;% end %&gt;  
  </code></pre>
  
  <p>and routes.rb:  </p>
  
  <blockquote>
    <p>resources :persons  </p>
  </blockquote>
  
  <p>But when I submit the form I get:  </p>
  
  <blockquote>
    <p>AbstractController::ActionNotFound<br>
    The action '5231d2491dba7fb057000004' could not be found for PersonsController</p>
  </blockquote>
  
  <p>The 5231....... is id of a person.  </p>
  
  <p>Request Parameters:  </p>
  
  <pre><code>{"utf8"=&gt;"✓", "_method"=&gt;"put", "authenticity_token"=&gt;"3TL7nn4UxhxFoxETeooBMThhkE0VdMoGFpjN9sx4srk=", "person"=&gt;{"location"=&gt;"nagpur"}, "commit"=&gt;"submit", "controller"=&gt;"persons", "action"=&gt;"5231d2491dba7fb057000004"}
  </code></pre>
  
  <p>What is wrong here? I'm using mongoid and rails 3.2.13.</p>