<% unless response.status == 200 %>
  $(".footer .errors").addClass("alert-danger");
  $(".footer .errors").append("<p><%= j @error.message %></p>");
<% end %>

<% unless response.status == 200 %>
  $('.footer .errors').empty();
  $(".footer .errors").addClass("alert-danger");
  $(".footer .errors").append("<p><%= j @error.message %></p>");
<% end %>

Make sure the errors span gets cleared before appending the error
Make sure the errors span gets cleared before appending the error
