$('#dialog h3.modal-title').html("Actualizar precio de venta");

// Render the edit form
$('.modal-body').html('<%= j render "products/form_update_price" %>')
// Show the dynamic dialog
$('#dialog').modal("show");

// Set focus to the first element
$('#dialog').on('shown.bs.modal', function () {
      $('.first_input').focus()
 })
