Permit detail attributes and update all attributes instead of just extra
This commit is contained in:
parent
bb736ce084
commit
ace4fb8568
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
Loading…
Reference in a new issue