mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Recognize current tab with String#starts_with? instead of regexp
This commit is contained in:
parent
d56f9cdbac
commit
0991e649c7
1 changed files with 6 additions and 7 deletions
|
@ -5,13 +5,12 @@
|
|||
ul.nav
|
||||
- tabs.each do |title, url|
|
||||
- if url == ''
|
||||
li class="#{(current_path == url) ? 'active':''}"
|
||||
a href='#{{root_path}}#{{url}}' = t(title)
|
||||
li class="#{current_path == url ? 'active' : ''}"
|
||||
a href="#{{root_path}}#{{url}}" = t(title)
|
||||
- else
|
||||
li class="#{(current_path =~ Regexp.new(url)) ? 'active':''}"
|
||||
a href='#{{root_path}}#{{url}}' = t(title)
|
||||
li class="#{current_path.starts_with?(url) ? 'active' : ''}"
|
||||
a href="#{{root_path}}#{{url}}" = t(title)
|
||||
|
||||
- custom_tabs.each do |title, url|
|
||||
li class="#{(current_path =~ Regexp.new(url)) ? 'active':''}"
|
||||
a href='#{{root_path}}#{{url}}' = t(title)
|
||||
|
||||
li class="#{current_path.starts_with?(url) ? 'active' : ''}"
|
||||
a href="#{{root_path}}#{{url}}" = t(title)
|
||||
|
|
Loading…
Add table
Reference in a new issue