I am new to Rails and this probably breaks all sorts of standards but I got it to work by doing the following.
In the view I put the following code for the form_for declaration
<% form_for :entity, :url => { :action => :update_entity, :entity_id => @entity.id } do |form| %>
And in the controller this code
@entity = Entity.find(params[:entity_id])