From 78df1df683509451d688d8c18653f33ec470f9e2 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 8 Jan 2023 01:30:12 -0800 Subject: [PATCH] Allow empty strong params --- app/controllers/api/v1/parties_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/parties_controller.rb b/app/controllers/api/v1/parties_controller.rb index 169312c..258de6a 100644 --- a/app/controllers/api/v1/parties_controller.rb +++ b/app/controllers/api/v1/parties_controller.rb @@ -11,6 +11,10 @@ module Api party = Party.new(shortcode: random_string) party.user = current_user if current_user + if party_params + party.attributes = party_params + end + # unless party_params.empty? # party.attributes = party_params # @@ -152,7 +156,7 @@ module Api :button_count, :turn_count, :chain_count - ) + ) if params[:party].present? end end end