If I understand correctly, the problem is that you don't know in your action whether to expect params[:itemlist1], or params[:itemlistN]. You could try something like:
params.to_a.each do |key, value| if key.index('itemlist') == 0 order = params[key] # Process the order end end
Cheers, Chris