jeudi 21 mai 2015

boostrap + ROR 3.2.21 navbar isn't working

The Home section is the navbar, but it isn't showing up how its suppose to. It used to work, but I have no idea what I did and it stop working.
html loaded
You can see that the boostrap.min.js and boostrap.min.css are loadded
resources loaded

I have bootstrap.min.js in vendor folder and boostrap.min.css as well. I have included them in application.css and application.js. I do have config.assets.enabled = true ,because if I set it to false no css or js gets loaded. I am sure it has to do with asset pipeline, but I keep searching and trying new things and none of them seem to work.
I did install bootstrap without using a gem I downloaded the files and put them in the vendor folder. I am still new to ruby on rails.
Below is my _nabar.html.haml file, but it did work before. So I don't think its any of that.

    %nav.navbar.navbar-default{role: "navigation"}
  / Brand and toggle get grouped for better mobile display
  .navbar-header
    %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
      %span.sr-only Toggle navigation
      %span.icon-bar
      %span.icon-bar
      %span.icon-bar
    =link_to "Home", root_path, :class => "navbar-brand"
  / Collect the nav links, forms, and other content for toggling
  .navbar-collapse.collapse
    %ul.nav.navbar-nav
    - if current_user.admin?
      %li{:class => (current_page?(users_path)? "active" : "")} 
        =link_to "Users", users_path
      %li{:class => (current_page?(member_emails_path)? "active" : "")} 
        =link_to "Member Emails", member_emails_path      
      %li{:class => (current_page?(class_names_path)? "active" : "")} 
        =link_to "Classes", class_names_path      
      %li{:class => (current_page?(class_test_names_path)? "active" : "")} 
        =link_to "Test Categories", class_test_names_path      
      %li{:class => (current_page?(test_entries_path)? "active" : "")} 
        =link_to "Test Entry", test_entries_path
    %ul.nav.navbar-nav.navbar-right
      %li
        =link_to "Sign Out", destroy_user_session_path, :method => :delete

Aucun commentaire:

Enregistrer un commentaire