5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 02:56:21 +00:00

fixup! feat: pluck_param nos ayuda a encontrar un param semanticamente

This commit is contained in:
f 2024-07-11 16:04:35 -03:00
parent c1096871a6
commit 54a4deac27
No known key found for this signature in database

View file

@ -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