In most frameworks, sending a redirect means setting the HTTP headers and exiting without sending any HTML data back to the browser. However, using Firebug I see that Rails is not following this convention:
def update
@phone_number = PhoneNumber.find(params[:id])
if @phone_number.update_attributes(params[:phone_number])
flash[:notice] = "Successfully updated phone number."
redirect_to @phone_number
else
render :action => 'edit'
end
end
In response, the headers have:
Connection close
Date Tue, 27 Oct 2009 06:17:00 GMT
X-Runtime 28
Location http://localhost:3000/phone_numbers/1999521184
and it also has the results from the show action, twice
Any ideas why?