%= form_tag do_record_payments_path, :class => 'form-horizontal' do %>
<% unless @account_id.nil? %>
<%= render(:partial => 'invoices_table') %>
<% end %>
<% end %>
<%= javascript_tag do %>
$(document).ready(function() {
$('#account_id').change(function() {
$("#invoices").html("<%= j render(:partial => 'invoices_table') %>");
});
});
<% end %>