<% if @post.errors.any? %>
  Danbooru.error("<%= j @post.errors.full_messages.join('; ') %>");
<% elsif @error %>
  Danbooru.error("<%= j @error.to_s %>");
<% else %>
  Danbooru.notice("Post was permanently deleted");
<% end %>
