%table#orders_products %thead %tr %th Product %th Quantity %th Unit Price %th Line Price %th %th %th %tbody - @order.orders_products.each do |orders_product| %tr %td= orders_product.product.name %td= orders_product.quantity %td= orders_product.quoted_unit_price %td= orders_product.full_line_price %td= link_to 'Show', orders_product %td= link_to 'Edit', edit_orders_product_path(orders_product) %td= link_to 'Delete', orders_product, method: :delete, data: { confirm: 'Are you sure?' } %tfoot %tr %td{:colspan=>2}='Total' %td=@order.orders_products.sum(:full_line_price).to_s