app/views/categories/show.html.erb
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1><%= @category.display_name %></h1>
<p class="lead"><%= @category.meetups.count %> Meetups</p>
</div>
</div>
<br/>
<% if policy(@category).edit? %>
<div class="row">
<div class="col-md-8 col-sm-12">
<%else %>
<div>
<% end %>
<h2><%= I18n.t 'activerecord.model.meetup.other' %></h2>
<% if @category.meetups.count == 0 %>
<p><%= I18n.t 'category.no_meetups' %></p>
<% else %>
<% @category.meetups.each do |meetup| %>
<%= render 'meetups/card', meetup: meetup %>
<% end %>
<% end %>
<% if policy(@category).edit? %>
</div>
<div class="col-md-4 col-sm-12 card">
<%= link_to edit_category_path(@category), class:'btn btn-primary btn-lg btn-block' do %><%= icon('fas', 'pencil') %> <%= I18n.t 'main.edit' %><% end %>
<% if policy(@category).destroy? %>
<%= link_to category_path(@category), method: :delete, class:'btn btn-danger btn-lg btn-block' do %><%= icon('fas', 'times') %> <%= I18n.t 'main.delete' %><% end %>
<% end %>
<hr/>
</div>
<% end %>
</div>