]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/banner_helper.rb
Allow setting HTTP ACCEPT header for notes API
[rails.git] / app / helpers / banner_helper.rb
index 661369454fb065b024985df35b347d0fb09c2f55..17c6eace3d4eb2cf4c4f24e5d208ab07925acdd7 100644 (file)
@@ -26,9 +26,9 @@ module BannerHelper
 
       # 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
+      # pick banner with minimum queue position
       next if index > min_index
 
       # or if equal queue position, pick banner with soonest end date (i.e. next expiring)