** Get the value with the check box of the form checked and make it into an array. ** **
ActionController::Parameters {"authenticity_token"=>"DoVsq/+dLxgEzm0kXJUo4SWmHx5CBR1GmeV+yNaAeYcDmyMg8nWcMDNSWeMY**************==", "hogehoge"=><ActionController::Parameters {"aaa"=>"0", "bbb"=>"1", "ccc"=>"1", "ddd"=>"1",} permitted: false>, "commit"=>"Search", "controller"=>"distributions", "action"=>"search"} permitted: false>
** Because the form comes like this **
params[:hogehoge].permit!.select { |key, value| value == "1" }.keys
["bbb","ccc", "ddd"]
I got it as **. ** **
Recommended Posts