<% if article.error %>
  <div class="alert alert-danger">
    <%= article.error %>
  </div>
<% end %>

<div class="page-header">
  <div class="btn-group pull-right">
    <form accept-charset="UTF-8" action="/editor/articles/<%= article.id %>" method="post">
      <input type="hidden" name="_method" value="delete" />
      <button type="submit" class="btn btn-success">Delete</button>
    </form>
  </div>
  <h3>Edit Article</h3>
</div>

<form role="form" accept-charset="UTF-8" action="/editor/articles/<%= article.id %>" method="post">
  <input type="hidden" name="_method" value="put" />

  <%= erb :article_fields, :locals => { :article => article, :categories => categories } %>

  <button type="submit" class="btn btn-default">Save</button>
</form>

<% if article.error %>
  <div class="alert alert-danger">
    <%= article.error %>
  </div>
<% end %>

<div class="page-header">
  <div class="btn-group pull-right">
    <form accept-charset="UTF-8" action="/editor/articles/<%= article.id %>" method="post">
      <input type="hidden" name="_method" value="delete" />
      <button type="submit" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this?')">
        Delete
      </button>
    </form>
  </div>
  <h3>Edit Article</h3>
</div>

<form role="form" accept-charset="UTF-8" action="/editor/articles/<%= article.id %>" method="post">
  <input type="hidden" name="_method" value="put" />

  <%= erb :article_fields, :locals => { :article => article, :categories => categories } %>

  <button type="submit" class="btn btn-default">Save</button>
</form>

Add confirm prompt to delete
Add confirm prompt to delete
