Ruby on rails 如何查找rails控制器上是否设置了参数?
开发人员是否可以使用任何方法来检查rails控制器中是否设置了特定参数???这是您想要存档的吗Ruby on rails 如何查找rails控制器上是否设置了参数?,ruby-on-rails,parameters,Ruby On Rails,Parameters,开发人员是否可以使用任何方法来检查rails控制器中是否设置了特定参数???这是您想要存档的吗 if parmas[:my_params] #param is set, do your stuff else #it's not set, do another stuff end 这是你想要存档的吗 if parmas[:my_params] #param is set, do your stuff else #it's not set, do another
if parmas[:my_params]
#param is set, do your stuff
else
#it's not set, do another stuff
end
这是你想要存档的吗
if parmas[:my_params]
#param is set, do your stuff
else
#it's not set, do another stuff
end
试试这个:
# root level parameter
params[:search_key].present?
试试这个:
# root level parameter
params[:search_key].present?
请详细解释以便某人能够回答…….请详细解释以便某人能够回答。。。。。。。。