Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8485601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:41:40+00:00 2026-06-10T20:41:40+00:00

In my application.html.erb, I have the following: <head> <title><%= title %></title> <%= stylesheet_link_tag application,

  • 0

In my application.html.erb, I have the following:

<head>
  <title><%= title %></title>
  <%= stylesheet_link_tag "application", media: 'all' %>
  <%= javascript_include_tag "application" %>
  <%= javascript_include_tag "https://js.stripe.com/v1/", "application" %>
  <%= csrf_meta_tags %>
  <%= tag :meta, :name => "stripe-key", :content => STRIPE_PUBLIC_KEY %>
  <%= javascript_include_tag "http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js", "application" %>
  <%= render 'layouts/shim' %>
</head>

In my gemfile, I have the following:

gem 'twitter-bootstrap-rails'
gem 'bootstrap-datepicker-rails'

In my views\layouts_header.html.erb, I have:

  <li class="dropdown" id="admin_menu">
    <a class="dropdown-toggle" data-toggle="dropdown" data-target="#admin_menu">
      <%= ADMIN_TITLE %>
      <b class="caret"></b>
    </a>
    <ul class="dropdown-menu">
      <% Admin_menu.each do |menu_text, menu_action| %>
          <li><a href="<%= menu_action %>"><%= menu_text %></a></li>
      <% end %>
    </ul>
  </li>

Admin_menu is defined elsewhere as:
Admin_menu = Hash.new
Admin_menu[“Papers”] = “/papers”
Admin_menu[“Tracks”] = “/tracks”
Admin_menu[“Attendance”] = “/attendance”

When I click on the caret, nothing happens. I checked the HTML code, and the dropdown menu selections are there.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:41:41+00:00Added an answer on June 10, 2026 at 8:41 pm

    You need to change these lines:

    <%= javascript_include_tag "application" %>
    <%= javascript_include_tag "https://js.stripe.com/v1/", "application" %>
    <%= javascript_include_tag "http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js", "application" %>
    

    to this:

    <%= javascript_include_tag "https://js.stripe.com/v1/" %>
    <%= javascript_include_tag "application" %>
    

    Your current code includes application.js many times, which is a problem for Bootstrap’s dropdown code. I’ll bet if you look in your application.js file, you’ll see this near the top:

    //= require bootstrap
    

    That would mean you’re loading bootstrap once every time you include application.js, then again from github.

    If you read Bootstrap’s Dropdown JS code, you’ll see it adds a click listener to toggle the dropdown menu. If you run this code twice, you’re adding two click listeners. So on every click, those two listeners open the menu and suddenly close it again.

    I had a problem similar to yours, where I didn’t notice that my javascript_include_tag for Stripe was also re-including application. I guess we probably copy/pasted from the same place!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Rails 3.2.3 application I have the following code in the application.html.erb to
<html> <head> <title>My HTML application</title> <HTA:APPLICATION id=frames border=thin caption=yes icon=http://www.google.com/favicon.ico showintaskbar=yes singleinstance=yes sysmenu=yes navigable=yes
I have this statement in application.html.erb: <%= yield(:javascript) %> and I have the following
I have the following code in my application.erb.html $alertdiv.text(some message); but I need to
In my global.css file which is loaded by application.html.erb , I have the following
I've been following this post http://martinciu.com/2011/01/mounting-grape-api-inside-rails-application.html I put the module into the lib directory
I've installed devise on my app and applied the following in my application.html.erb file:
I have a form for creating an album like following: # app/views/albums/new.html.erb <h2>Details of
I have my login-partial in my application.html.erb-layout. Now I want to validate it, if
I have the following code in my view located in \app\views\deployment_group named make_deployment_group.html.erb <%=

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.