I\'m receiving a JSON package like:
{
\"point_code\" : { \"guid\" : \"f6a0805a-3404-403c-8af3-bfddf9d334f2\" }
}
I would like to tell Rai
require takes one parameter. So there is no way you can pass in multiple keys unless you override the require method. You can achieve what you want with some additional logic in your action:
def action
raise ActionController::ParameterMissing.new("param not found: point_code") if point_params[:point_code].blank?
raise ActionController::ParameterMissing.new("param not found: guid") if point_params[:point_code][:guid].blank?
end
def point_params
params.permit(point_code: :guid)
end