app/views/application/_creation_dropdown.html.erb
<% unless resources.empty? %>
<% button_id = SecureRandom.uuid %>
<div role="group">
<button id="<%= button_id %>" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Create <%= resource_type %>
</button>
<div class="dropdown-menu" aria-labelledby="<%= button_id %>">
<%= render partial: 'dropdown_item', collection: resources.sort_by(&:name), as: :item %>
</div>
</div>
<% end %>