diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-02-13 09:24:34 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-02-13 09:24:34 +0100 |
commit | bd4b14c25abce830d074b4d302cf5b3bda1b1a08 (patch) | |
tree | d46c89b4dc0c21b8f6ed940c278099f733fece0b | |
parent | a025a37a4154c4ea1f60c8264000c965cab9f6b9 (diff) | |
download | sonarqube-bd4b14c25abce830d074b4d302cf5b3bda1b1a08.tar.gz sonarqube-bd4b14c25abce830d074b4d302cf5b3bda1b1a08.zip |
SONAR-5998 Fix pagination to manage null pageSize
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/models/api/pagination.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/models/api/pagination.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/models/api/pagination.rb index fcd03b171e4..22b534a7d35 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/models/api/pagination.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/models/api/pagination.rb @@ -34,7 +34,7 @@ class Api::Pagination attr_accessor :page_entries def initialize(options={}) - @per_page=options[:per_page].to_i||DEFAULT_PER_PAGE + @per_page = (options[:per_page]||DEFAULT_PER_PAGE).to_i @page=options[:page].to_i @page=1 if @page<1 @count = options[:count].to_i |