15 lines
500 B
Text
15 lines
500 B
Text
<%= @user.name %>
|
|
|
|
<%= form_for( @order, url: user_orders_path(@user)) do |f| %>
|
|
<%= render 'application/errors', model: @order %>
|
|
|
|
<%= f.fields_for :order_products do |op_field| %>
|
|
<div class="input-group">
|
|
<%= render partial: 'btn_dec' %>
|
|
<%= op_field.text_field :count, class: 'form-control', value: 0 %>
|
|
<%= render partial: 'btn_inc' %>
|
|
<%= op_field.hidden_field :product_id %>
|
|
</div>
|
|
<% end %>
|
|
<%= f.submit "Order", class: "btn btn-primary " %>
|
|
<% end %>
|