X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dc2a2c8ebd1a11e4a64555fda22c6859a51defff..ec9d2fde783796829a84655387e1810ea4b5e642:/lib/classic_pagination/pagination_helper.rb diff --git a/lib/classic_pagination/pagination_helper.rb b/lib/classic_pagination/pagination_helper.rb index da1bcbec6..ae03b82b2 100644 --- a/lib/classic_pagination/pagination_helper.rb +++ b/lib/classic_pagination/pagination_helper.rb @@ -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 = ""