Edit a form

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

<title> 'Edit Person'</title>
do |p|%>
<u><span class="style1">Create or Search an Individual</span><span
<%=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:
a category"})%>
    <td><input name="title" type="checkbox" id="title" value="1" /></td>
    <td><input name="title_other" type="checkbox" id="title_other"
value="1" /></td>
    <td><strong>Title Other: <%=p.text_field "title_other"%>
...........and the rest fields continues ....

The controller is as

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

def update

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

Thank you.