]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/banner_helper.rb
Merge remote-tracking branch 'upstream/pull/3061'
[rails.git] / app / helpers / banner_helper.rb
index 661369454fb065b024985df35b347d0fb09c2f55..fef6eaa5e77c989c177eb0c15aed84687c844fbf 100644 (file)
@@ -26,7 +26,7 @@ module BannerHelper
 
       # rotate all banner queue positions
       index = cval.to_i
 
       # rotate all banner queue positions
       index = cval.to_i
-      cookies[ckey] = index - 1 if index > 0
+      cookies[ckey] = index - 1 if index.positive?
 
       # pick banner with mininum queue position
       next if index > min_index
 
       # pick banner with mininum queue position
       next if index > min_index