Edit a form

Hello,
I have two functions edit and update in my controller.
edit is used to display the person's details and when the update button
is clicked the update function should be executed.
The problem is after clicking the update button I get the error message
ID not found. I think the problem is that the form_for syntax i am using
is incorrect for editing. Please help me corect the problem

Here is the code:

The rhtml file that displays the form to be edited is as

#edit.rhtml
<title> 'Edit Person'</title>
<%form_for(:person,@person,:url=>{:action=>'update'},:html=>{:method=>'put'},
do |p|%>
<u><span class="style1">Create or Search an Individual</span><span
class="style2">l</span></u>
<%=submit_tag "Update Person"%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<table width="100%" border="9">
    <td width="4%"><input name="category" type="checkbox" id="category"
value="1" /></td>
    <td width="30%"><strong>Category:
<%=p.select("category_id",Category.find(:all).collect{|cat|[cat.category_name,cat.id]},{:prompt=>"-Select
a category"})%>
        </strong></td>
  </tr>
  <tr>
    <td><input name="title" type="checkbox" id="title" value="1" /></td>
    <td><strong>Title:<%=p.text_field("title")%></strong></td>
    <td><input name="title_other" type="checkbox" id="title_other"
value="1" /></td>
    <td><strong>Title Other: <%=p.text_field "title_other"%>
        </strong></td>
...........and the rest fields continues ....

The controller is as

#person_controller.rb
@person = Person.find(params[:id])
render :action=>'edit'
end

def update

  @person = Person.find(params[:id])
  if @person.update_attributes(params[:person])
    flash[:notice]= "Successfully Updated person."
    render :action=>'edit'
  end
end

Thank you.
Regards,
Anks