]> git.openstreetmap.org Git - rails.git/blobdiff - lib/classic_pagination/pagination_helper.rb
Merge remote-tracking branch 'openstreetmap/pull/1085'
[rails.git] / lib / classic_pagination / pagination_helper.rb
index da1bcbec6f05218a78b88a4c7eeb8143089af60d..ae03b82b25ef9aa96135a8b7570d58d2e66fe1ac 100644 (file)
@@ -97,9 +97,10 @@ module ActionView
 
         current_page = paginator.current_page
         window_pages = current_page.window(options[:window_size]).pages
-        return if window_pages.length <= 1 unless link_to_current_page
+        return unless link_to_current_page || window_pages.length > 1
 
-        first, last = paginator.first, paginator.last
+        first = paginator.first
+        last = paginator.last
 
         html = ""