Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed bug where active class is not properly set in render_list #44

Open
wants to merge 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/bootstrap_helper/helper.rb
View
3  lib/bootstrap_helper/helper.rb
@@ -158,8 +158,9 @@ def render_list(list=[], options={})
end
link = item_content.match(/href=(["'])(.*?)(\1)/)[2] rescue nil
+ current = request.fullpath
- if ( link && current_page?(link) ) || ( @current && @current.include?(link) )
+ if ( link && current_page?(link) ) || ( current && current.include?(link) )
item_class << "active"
end
Something went wrong with that request. Please try again.