Does anybody know how to pass value from select/4 (not connected to any form) as a parameter to path in link?
To get: query_string: "group_id=-1"
The case: on first page choose value in select list, pass it to second page by menu_path, second page behavior depands from this value.
I tried, but it does not work:
<%= select :group, :group_id, @groups, class: "form-control", prompt: "groups", selected: -1 %>
<%= link "add", to: menu_path(@conn, :new, @menu, group_id: group_id), class: "btn btn-success btn-xs" %>
Appreciate your help.