We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3b675a commit 8fdfe5bCopy full SHA for 8fdfe5b
lib/resque/server.rb
@@ -26,6 +26,10 @@ def current_section
26
url_path request.path_info.sub('/','').split('/')[0].downcase
27
end
28
29
+ def current_subtab
30
+ url_path request.path_info.sub('/','').split('/')[0, 2].join('/').downcase
31
+ end
32
+
33
def current_page
34
url_path request.path_info.sub('/','')
35
@@ -40,7 +44,7 @@ def path_prefix
40
44
41
45
42
46
def class_if_current(path = '')
43
- 'class="current"' if current_page[0, path.size] == path
47
+ 'class="current"' if [current_section, current_subtab].include?(path)
48
49
50
def tab(name)
0 commit comments