title: remove unwanted parameters in rails
body: <pre><code>Parameters: {
    "artist"=&gt;{
      "photos_attributes"=&gt; {
         "0"=&gt;{"id"=&gt;"96", "description"=&gt;"", "upload_on_facebook"=&gt;"0"}, 
          "1"=&gt;{"id"=&gt;"97"}
       }, 
       "professional_nickname" =&gt; "testing",
       "authenticity_token"=&gt;"xyz", 
       "utf8"=&gt;"✓", "id"=&gt;"testing"
     }
  }
  </code></pre>
  
  <p>In my photo show page I delete one of photo from photo album. photo successfully deleted by using ajax (also it's remove from table). but after then I submit for update description for others image then it's comes error.</p>
  
  <pre><code>Couldn't find Photo with ID=97 for Artist with ID=31
  </code></pre>
  
  <p>I delete this record but I my params it show that Id.</p>
  
  <p><strong>My controller update action</strong></p>
  
  <pre><code>if @artist.update_attributes(params[:artist])
     flash[:notice] = "Artist record been updated successfully"
     redirect_to admin_artists_url
  else
     render :edit
  end
  </code></pre>
  
  <p>After delete with ajax how can I remove this "1"=>{"id"=>"97"} from parameters. I am using semantic_form_for.</p>