From ace4fb856895e997a5615ee8814d0409a30c7250 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 23 Feb 2022 18:11:19 -0800 Subject: [PATCH] Permit detail attributes and update all attributes instead of just extra --- app/controllers/api/v1/parties_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/parties_controller.rb b/app/controllers/api/v1/parties_controller.rb index e182104..77c6f61 100644 --- a/app/controllers/api/v1/parties_controller.rb +++ b/app/controllers/api/v1/parties_controller.rb @@ -25,7 +25,7 @@ class Api::V1::PartiesController < Api::V1::ApiController if @party.user != current_user render_unauthorized_response else - @party.extra = party_params['is_extra'] + @party.attributes = party_params render :update, status: :ok if @party.save! end end @@ -71,6 +71,6 @@ class Api::V1::PartiesController < Api::V1::ApiController end def party_params - params.require(:party).permit(:user_id, :is_extra) + params.require(:party).permit(:user_id, :is_extra, :name, :description, :raid_id) end end \ No newline at end of file