]> git.openstreetmap.org Git - rails.git/blobdiff - lib/classic_pagination/pagination.rb
Fix new rubocop warnings
[rails.git] / lib / classic_pagination / pagination.rb
index b54b0e9f85a8b316ea296f1a42fae66720548784..97f0530a81f0a958f8dda767c7dfb50a96535100 100644 (file)
@@ -278,7 +278,7 @@ module ActionController
 
       # Returns true if this paginator contains the page of index +number+.
       def contains_page?(number)
-        number >= 1 && number <= page_count
+        number.between?(1, page_count)
       end
 
       # Returns a new Page representing the page with the given index