<% content_for :title, "Inventory" %>

<% content_for :content_size, "col-sm-9 col-md-10" %>

<% content_for :sidebar do %>
  <%= render "common/category_nav" %>
<% end %>

<% content_for :content do %>
  <h4><%= controller.action_name.humanize %> Category</h4>
  <%= form_for @category do |f| %>
    <div class="form-group">
      <%= f.label 'Description:' %>
      <%= f.text_field :description, class: "form-control" %>
    </div>
    <%= f.submit "Save", class: "btn btn-primary" %>
    <%= link_to "Cancel", :back, type: "button", class: "btn btn-default" %>

    <%= link_to_if @category.persisted?, "Delete", { action: :destroy, id: @category.id, method: :delete }, data: { confirm: 'Are you sure?' }, class: "btn btn-danger pull-right" %>
  <% end %>
<% end %>

<% content_for :title, "Inventory" %>

<% content_for :content_size, "col-sm-9 col-md-10" %>

<% content_for :sidebar do %>
  <%= render "common/category_nav" %>
<% end %>

<% content_for :content do %>
  <h4><%= controller.action_name.humanize %> Category</h4>
  <%= form_for @category do |f| %>
    <div class="form-group">
      <%= f.label 'Description:' %>
      <%= f.text_field :description, class: "form-control" %>
    </div>
    <%= f.submit "Save", class: "btn btn-primary" %>
    <%= link_to "Cancel", :back, type: "button", class: "btn btn-default" %>

    <%= link_to "Delete", { action: :destroy, id: @category.id, method: :delete }, data: { confirm: 'Are you sure?' }, class: "btn btn-danger pull-right" if @category.persisted? %>
  <% end %>
<% end %>

Change category edit delete button logic
Change category edit delete button logic
