This seems so simple, yet I can't figure it out. For some reason, clicking on the dropdown menu is not working, yet everything else in twitter bootstrap is. I'm using ruby on rails. I've already looked at stackoverflow questions that say to simply wrap the whole ul in a div with class "drop down-menu", but that shouldn't be necessary. I should be able to do it inside the ul tag. Any ideas? Thank you.
<li id="fat-menu" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Account <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><%= link_to "Profile", current_user %></li>
<li><%=link_to "Settings", '#' %></li>
<li class="divider"></li>
<li>
<%= link_to "Sign out", signout_path, method: "delete" %>
</li>
</ul>
</li>
That is the main code where I believe the problem is. It might be somewhere below (same as above but with less taken out) but i doubt it:
<ul class="nav pull-right">
<li><%= link_to "Home", root_path %></li>
<li><%= link_to "Help", help_path %></li>
<% if signed_in? %>
<li><%= link_to "Users", '#' %></li>
<li id="fat-menu" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Account <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><%= link_to "Profile", current_user %></li>
<li><%=link_to "Settings", '#' %></li>
<li class="divider"></li>
<li>
<%= link_to "Sign out", signout_path, method: "delete" %>
</li>
</ul>
</li>
<%= "Technically signed in. should be true. It is: " + signed_in?.to_s %>
<% else %>
<%= "Technically not signed in. should be false. It is: " + signed_in?.to_s %>
<li><%= link_to "Sign in", signin_path %></li>
<% end %>
</ul>
Here is the application.js file
//= require bootstrap
//= require bootstrap-dropdown
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
?
and that is a different question.
– Philip7899 Sep 25 '13 at 00:49preceding the
– Helios de Guerra Sep 25 '13 at 01:50