Fixed tab detection, making the hack even dirtier

This commit is contained in:
Paul van Tilburg 2011-11-28 14:07:04 +01:00
parent d8538ec1d2
commit 9409686ddd
1 changed files with 2 additions and 1 deletions

View File

@ -1153,7 +1153,8 @@ module StopTime::Views
# Partial view that generates the menu link and determines the active
# menu item.
def _menu_link(label, ctrl)
if ctrl == self.helpers.class # FIXME: dirty hack?
# FIXME: dirty hack?
if self.helpers.class.to_s.match(/^#{ctrl.to_s}/)
li.selected { a label, :href => R(ctrl) }
else
li { a label, :href => R(ctrl) }