Access denied, Please sign in and make sure you have proper permission.
如题:在表格中修改number_file_tag
怎么将修改的值添加进数据库
@shooter
<table class="table">
@cart.line_items.each do |item| %>
<tr>
<td><%= item.product.title %></td>
<td><%= number_field_tag item.quantity, item.quantity,min: 1, max: 10 %>
</tr>
<% end %>
</table>
<%= button_to "checkout", new_order_path, method: :get %>
@shooter 参照敏捷开发 4 上面的,购物车情况,想在cart
里面直接修改line_item
中quantity
值。然后在 order 获取这个修改的值
#5 楼 @yeyong14 页面不刷新,可以走 ajax,绑定 number_field_tag 的某个事件,value 值修改后,发起 ajax 请求,,把修改的 value 传到后台,进行更新