$("#seller_errors").html(""); <% if @seller.errors.any? %> $('#seller_errors').removeClass('hidden'); <% @seller.errors.values.each do |message| %> $("#seller_errors").append($("
  • ").html("<%= message.first.to_s %>")); <% end %> <% else %> $('#dialog').modal('toggle'); window.location = "<%= sellers_path %>"; $("#notice").html("<%= flash[:notice] %>"); <% end %>