Allow empty strong params

This commit is contained in:
Justin Edmund 2023-01-08 01:30:12 -08:00
parent 382b2e2a92
commit 78df1df683

View file

@ -11,6 +11,10 @@ module Api
party = Party.new(shortcode: random_string) party = Party.new(shortcode: random_string)
party.user = current_user if current_user party.user = current_user if current_user
if party_params
party.attributes = party_params
end
# unless party_params.empty? # unless party_params.empty?
# party.attributes = party_params # party.attributes = party_params
# #
@ -152,7 +156,7 @@ module Api
:button_count, :button_count,
:turn_count, :turn_count,
:chain_count :chain_count
) ) if params[:party].present?
end end
end end
end end