app/views/home/_user_groups.html.erb
<% cache [user_groups, current_user.confirmed?] do %>
<div class="container-fluid bg-light">
<div class="container user-groups-container">
<div class="row">
<div class="col-md-12 mt-1">
<h2 class="text-center mt-1">
Your Groups
</h2>
<div class="row d-flex justify-content-center">
<% if !user_groups.empty? %>
<%= render partial: "group",
collection: user_groups, as: :group, cached: true %>
<% else %>
<h3 class="h5 text-center mt-4 pb-1">
You still don't have membership to any group.
</h3>
<% end %>
</div>
<div class="row mx-0 d-flex justify-content-center">
<div class="col-md-12 col-lg-8">
<%= render "create_group_button_with_tooltip" %>
</div>
</div>
</div>
</div>
</div>
</div>
<% end %>