0
我有這樣一個URL:Rails的合併同類PARAMS
http://localhost/recipes?search=items&item_id[]=1805&item_id[]=1808
此URL從
<%= form_tag(recipes_path, method: "get", :enforce_utf8 => false) do %>
<input type="hidden" name="search" value="items">
<%= select_tag "item_id", options_for_select(["155", "156", "157", "158"]), multiple: true, class: 'chosen-select', id: 'unique_id', data: { placeholder: "Enter the ids" } %>
<%= submit_tag "Search", :name => nil %>
<% end %>
出現如何合併相同的網址參數,讓它們看起來像以下內容,也刪除方括號?
http://localhost/recipes?search=items&item_id=1805,1808
「我有這樣的網址」 - 這個URL是從哪裏來的? – mudasobwa
添加代碼以發佈 –