<%= form_tag line_items_path(:product_id => product.id) do %> <%= label(:ammount, "Ammount:") %> <%= select_tag(:ammount, options_for_select([1,2,3,4,5,6,7,8,9,10])) %> <%= submit_tag 'Add to cart' %> <% end %>
希望实现上面代码类似的功能,但是我想要传输的是 ammout 的值给另一个 controller,类似于
<%= button_to 'Add to cart', line_items_path( :quantity => :ammount) %> 该如何实现呢?