Why doesn't my dropdown menu expand to select the options within?

86 Views Asked by At

I'm building a review site using ruby on rails. When I code the drop-down menu, included in the code below, it won't expand. I know from changing the code that the options are there and work, only the dropdown won't expand.

<body>

<nav class="navbar navbar-default">

  <div class="container">

    <div class="navbar-header">
      <%= link_to "NDLabClub", root_path, class: "navbar-brand" %>
    </div>
    <ul class="nav navbar-nav">
      <li><%= link_to "Sign Up", new_user_registration_path %></li>
      <% if user_signed_in? %>
        <li><%= link_to "Sign Out", destroy_user_session_path, method: :delete %></li>
        <% else %>
          <li><%= link_to "log In", new_user_session_path %></li>
      <% end %>
      </ul>

      <ul class="nav navbar-nav navbar-right">

        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
          aria-expanded="false">Categories <span class="caret"></span></a>
          <ul class="dropdown-menu" role="menu">
            <% Category.all.each do |category| %>
              <li>
                <%= link_to category.breed, dogs_path(category: category.breed), class: "link" %>
              </li>
          <% end %>
          </ul>
        </li>

        <% if user_signed_in? %>
          <li><%= link_to "Add Dog", new_dog_path%></li>
        <% end %>

      </ul>

  </div>
</nav>

<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>

<%= yield %>
0

There are 0 best solutions below