Skip to content

Update application.js #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.

// Need to be on top to allow Poltergeist test to work with React: es5-shim/es5-shim. This is lincluded in app-bundle.
//= require react_on_rails

// It is important that generated/vendor-bundle must be before bootstrap since it is exposing jQuery and jQuery-ujs
// CRITICAL that generated/vendor-bundle must be BEFORE bootstrap-sprockets and turbolinks since it is
// exposing jQuery and jQuery-ujs
//= require generated/vendor-bundle
//= require generated/app-bundle

//= require bootstrap-sprockets
// Next two depend on jQuery
//= require turbolinks
//= require bootstrap-sprockets

//= require react_on_rails

// TODO: move to this separate file.
$(document).on('ready page:load', function () {
$('nav a').parents('li,ul').removeClass('active');
$('nav a[href="' + this.location.pathname + '"]').parents('li,ul').addClass('active');
Expand Down