<% if @article.errors.any? %>
  $("#articles_form").html("<%= escape_javascript(render('edit')) %>");
<% else %>
  $("#articles_form").html("");
  $("#articles_list").html("<%= escape_javascript(render('articles')) %>");
<% end %>
