PRODUCTS

<%= render :partial => "shared/flash" %>

<%= link_to "Add new product", new_admin_product_path, class: "btn btn-primary" %>

<% @products.each_with_index do |product, x| %> <% end %>
# Name Category Short Desc  
<%= @no+x+1 %> <%= product.name %> <%= product.try(:category).try(:name) %> <%= product.short_description %> <%= link_to "Edit", edit_admin_product_path(product.id, :page => params[:page]), :class => "btn btn-success" %> <%= link_to "Delete", admin_product_path(product.id, :page => params[:page] ), :method => :delete, data: {:confirm => "Are you sure?"}, :class => "btn btn-danger" %>