From 54a4deac2700be02faeeb4fbd314365725cc03dc Mon Sep 17 00:00:00 2001 From: f Date: Thu, 11 Jul 2024 16:04:35 -0300 Subject: [PATCH] fixup! feat: pluck_param nos ayuda a encontrar un param semanticamente --- app/helpers/strong_params_helper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/helpers/strong_params_helper.rb b/app/helpers/strong_params_helper.rb index 8f8a26bf..f248cc50 100644 --- a/app/helpers/strong_params_helper.rb +++ b/app/helpers/strong_params_helper.rb @@ -8,9 +8,8 @@ module StrongParamsHelper # @todo No hay una forma mejor de hacer esto? # @param param [Symbol] # @param :optional [Bool] - # @param :params [StrongParameters] # @return [nil,String] - def pluck_param(param, optional: false, params: params) + def pluck_param(param, optional: false) if optional params.permit(param).values.first.presence else