diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-20 14:13:12 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-20 14:13:12 +0000 |
commit | 66d0db2e238cd3d94354772d7fe21e3f1d9ec7f2 (patch) | |
tree | f518cea91ea3535386d8f506d37b6a8690e9a0de | |
parent | c308b7be5ef974e5d5903bda250d09709e1c2580 (diff) | |
parent | e583df544308ff321ce92c79612ff950a4093e79 (diff) | |
download | gitlab-ce-66d0db2e238cd3d94354772d7fe21e3f1d9ec7f2.tar.gz |
Merge branch 'bug/500_pagination' into 'master'
Fix 500 error on project issues and merge requests pages
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 6 | ||||
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 3 |
4 files changed, 6 insertions, 8 deletions
@@ -63,7 +63,7 @@ gem "stamp" gem 'enumerize' # Pagination -gem "kaminari", "~> 0.14.1" +gem "kaminari", "~> 0.15.1" # HAML gem "haml-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 959a52f7eb5..a501aefcae2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -259,7 +259,7 @@ GEM json (1.8.1) jwt (0.1.8) multi_json (>= 1.5) - kaminari (0.14.1) + kaminari (0.15.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.8.1) @@ -281,7 +281,7 @@ GEM minitest (4.7.5) modernizr (2.6.2) sprockets (~> 2.0) - multi_json (1.8.2) + multi_json (1.8.4) multi_xml (0.5.5) multipart-post (1.2.0) mysql2 (0.3.11) @@ -600,7 +600,7 @@ DEPENDENCIES jquery-rails (= 2.1.3) jquery-turbolinks jquery-ui-rails (= 2.0.2) - kaminari (~> 0.14.1) + kaminari (~> 0.15.1) launchy letter_opener minitest (~> 4.7.0) diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 770fccaa11b..cb46b5b36e8 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -118,8 +118,7 @@ class Projects::IssuesController < Projects::ApplicationController def issues_filtered params[:scope] = 'all' if params[:scope].blank? params[:state] = 'opened' if params[:state].blank? - params[:project_id] = @project.id - @issues = FilteringService.new.execute(Issue, current_user, params) + @issues = FilteringService.new.execute(Issue, current_user, params.merge(project_id: @project.id)) end # Since iids are implemented only in 6.1 diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 40564c7f889..0792dbf041f 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -20,9 +20,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController params[:sort] ||= 'newest' params[:scope] = 'all' if params[:scope].blank? params[:state] = 'opened' if params[:state].blank? - params[:project_id] = @project.id - @merge_requests = FilteringService.new.execute(MergeRequest, current_user, params) + @merge_requests = FilteringService.new.execute(MergeRequest, current_user, params.merge(project_id: @project.id)) @merge_requests = @merge_requests.page(params[:page]).per(20) @sort = params[:sort].humanize |