mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 09:06:22 +00:00
fixup! feat: pluck_param nos ayuda a encontrar un param semanticamente
This commit is contained in:
parent
c1096871a6
commit
54a4deac27
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue