In rails , I met a question!
when i use the multiple select ,i don’t know ,how can i get the all parameter values ,it likes
in javaEE,
String[] strs=request.getParameters("aaa");
so,who can tell me the method in rails to realize the function?
Thank you in advance!
You search for “params”. See http://api.rubyonrails.org/classes/ActionController/Base.html#Parameters for reference (subsection #Parameters). You can access the “aaa” parameter (GET/POST) using params[:aaa].
If you have a multi select in your form that value will just be an array of those values.