]> git.openstreetmap.org Git - rails.git/blobdiff - lib/classic_pagination/pagination.rb
Add reload on iframe redirect
[rails.git] / lib / classic_pagination / pagination.rb
index c7022e0b0b914707c549c458f347f89b8bc530a4..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
@@ -288,7 +288,7 @@ module ActionController
       end
 
       # Successively yields all the paginator's pages to the given block.
-      def each(&_block)
+      def each(&)
         page_count.times do |n|
           yield self[n + 1]
         end