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

15 lines
426 B
Text

<h3>Order for <%= @user.nickname %> (Huidige schuld: <%= euro(@user.debt) %>)</h3>
<div class="row">
<%= f_form_for [@user, @order] do |f| %>
<%= f.error_messages %>
<div class="col-md-12">
<%= f.fields_for :order_items do |op_field| %>
<%= render op_field.object, f: op_field, product: op_field.object.product %>
<% end %>
</div>
<%= render 'orders/price', f: f %>
<% end %>
</div>