$("#error_explanation_remote_customer").html("") <% if @customer.errors.any? %> $('#error_explanation_remote_customer').removeClass('hidden'); <% @customer.errors.values.each do |message| %> $("#error_explanation_remote_customer").append($("
  • ").html("<%= message.first.to_s %>")); <% end %> <% else %> $('#sale_customer_id').append($('