Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.50 KB | None | 0 0
  1.   def update
  2.     @nhs_contract = current_user.nhs_contracts.find(params[:id])
  3.  
  4.     respond_to do |format|
  5.       if @nhs_contract.update_attributes(params[:nhs_contract])
  6.         byebug  
  7.         format.html { redirect_to @nhs_contract, notice: 'NHS contract was successfully updated.' }
  8.         format.json { head :no_content }
  9.       else
  10.         format.html { render action: "edit" }
  11.         format.json { render json: @nhs_contract.errors, status: :unprocessable_entity }
  12.       end
  13.     end
  14.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement