X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dc2a2c8ebd1a11e4a64555fda22c6859a51defff..4b2c64fbed7ed3420e10d1f1a7eaef26f0e4e025:/lib/classic_pagination/pagination.rb diff --git a/lib/classic_pagination/pagination.rb b/lib/classic_pagination/pagination.rb index 990a53d8b..32995a5f6 100644 --- a/lib/classic_pagination/pagination.rb +++ b/lib/classic_pagination/pagination.rb @@ -359,13 +359,13 @@ module ActionController # Returns a new Page object representing the page just before this # page, or nil if this is the first page. def previous - if first? then nil else @paginator[@number - 1] end + first? ? nil : @paginator[@number - 1] end # Returns a new Page object representing the page just after this # page, or nil if this is the last page. def next - if last? then nil else @paginator[@number + 1] end + last? ? nil : @paginator[@number + 1] end # Returns a new Window object for this page with the specified