tap/app/views/orders/new.html.erb

16 lines
500 B
Text
Raw Normal View History

2014-11-25 15:27:12 +01:00
<%= @user.name %>
2014-11-25 16:38:08 +01:00
<%= form_for( @order, url: user_orders_path(@user)) do |f| %>
<%= render 'application/errors', model: @order %>
2014-12-05 16:15:07 +01:00
<%= 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>
2014-12-04 17:02:08 +01:00
<% end %>
2014-11-25 15:27:12 +01:00
<%= f.submit "Order", class: "btn btn-primary " %>
<% end %>