X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/64146b4f3614854e6a0f8430f27261fe0a0ca26c..de29e9b3f59d7a06fbe2e32096328bd8a6ed2b3a:/lib/classic_pagination/pagination.rb diff --git a/lib/classic_pagination/pagination.rb b/lib/classic_pagination/pagination.rb index 054b2bb34..811d09239 100644 --- a/lib/classic_pagination/pagination.rb +++ b/lib/classic_pagination/pagination.rb @@ -398,7 +398,7 @@ module ActionController # Sets the window's padding (the number of pages on either side of the # window page). def padding=(padding) - @padding = padding < 0 ? 0 : padding + @padding = padding.negative? ? 0 : padding # Find the beginning and end pages of the window @first = if @paginator.has_page_number?(@page.number - @padding) @paginator[@page.number - @padding]