tap/app/views/orders/new.html.erb
2014-12-06 12:03:08 +01:00

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 %>