$('#modalContainer').html('<%= j(render("group_order_invoices/modal", order: @order)) %>'); $('#modalContainer').modal();