From: Bryan Housel Date: Tue, 21 Jun 2016 10:45:22 +0000 (-0400) Subject: Set max queuePos high to ensure a banner is shown X-Git-Tag: live~3860^2~5 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/933335a0ea28f274bc7301c18611bcd90709fd99?ds=sidebyside Set max queuePos high to ensure a banner is shown Previously it was possible for no banners to fall below max queuePos, in the situation where several banners get removed from active rotation. --- diff --git a/app/views/layouts/_banner.html.erb b/app/views/layouts/_banner.html.erb index 94abb5c1f..a1091c887 100644 --- a/app/views/layouts/_banner.html.erb +++ b/app/views/layouts/_banner.html.erb @@ -13,7 +13,7 @@ bannerSym = nil cookieStr = nil -queuePos = active_banners.length +queuePos = 9999 # pick least recently seen banner that is not hidden active_banners.each_key do |k|