#7 refactoring code; params[:id]==nil should be deleted!