redirect_to :action => 'edit', :id => @document.id
then you should have the value of @document.id in params[:id] inside the edit action.
redirect_to :action => 'edit', :id => @document.id
then you should have the value of @document.id in params[:id] inside the edit action.