fix tab index counter. In case of a server restart the global var does not exist anymore causing an error

This commit is contained in:
Reinier Balt 2011-05-23 14:42:47 +02:00
parent 63f389158b
commit c5c4c65f3c

View file

@ -417,6 +417,9 @@ module TodosHelper
end
def next_tab_index
# make sure it exists if reset was not called. Set to 20 to avoid clashes with existing form in sidebar
$tracks_tab_index ||= 20
$tracks_tab_index = $tracks_tab_index + 1
return $tracks_tab_index
end