If I set up param validation on a Grape API request is it possible to get a hash of just the validated params?
desc "My Grape API request handler"
params do
requires :name
optional :description
end
post do
puts params.inspect # has all the params passed to request,
# even params not defined in validation block
end
Is there another way to just get the params
limited to the ones listed in the param validation block? Kind of like how Rails strong_parameters works.