custom scaffolding problem

Your update does not redirect back to edit, thus you are getting the error. If you don’t tell the controller to render or redirect explicitly, it will render whatever template matches the name of the action.

def update

@client = Client.find(params[:id])

if @client.save
  flash[:notice] = 'Profile updated!'
else
  render :action => 'edit'
end

end

Should be

def update @client = Client.find(params[:id])

if @client.save
  flash[:notice] = 'Profile updated!'
 redirect_to :action=>"edit", :id=>@client
else
  render :action => 'edit'
end

end