我正在使用Bootstrap-Dropdown菜單進行導軌操作,但目前它無法運行。當我點擊下拉鍊接時,它會爲網址添加一個'#',而其他內容都不會改變。Bootstrap-Dropdown無法運行[RAILS]
「_header.html.erb」
<% if signed_in? %>
<li><%= link_to "Device", '/devices' %></li>
<li><%= link_to "Users", users_path %></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", edit_user_path(current_user) %></li>
<li class="divider"></li>
<li>
<%= link_to "Sign out", signout_path, method: "delete" %>
</li>
</ul>
</li>
<% else %>
<li><%= link_to "Sign in", signin_path %></li>
<% end %>
的application.js
//= require bootstrap
//= require bootstrap-dropdown
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
application.html.erb
<head>
<title><%= full_title(yield(:title)) %></title>
<%= javascript_include_tag "https://js.stripe.com/v1/" %>
<%= stylesheet_link_tag "application", media: "all",
"data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
<%= render 'layouts/shim' %>
</head>
沒有工作。任何其他想法 – Marcus
看到我更新的答案 – tyler