Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-08-01 11:40:41 +0300
committerRémy Coutable <remy@rymai.me>2017-08-01 17:07:05 +0300
commitf67c7a4da6eb7e363f5433df74016f234999c467 (patch)
tree6dcc54e8f7aa0f4589c8cafd52b70ebf8bda2ac2 /app/controllers/projects
parente753444c7341bb9c327aaf7db69a4e612bff0449 (diff)
Fix Issue board when using Ruby 2.4
In Ruby 2.4, Hash#compact exists and returns a Hash, while in Ruby 2.3, Hash#compact is implemented by Rails and returns a new `ActionController::Parameters` instance in this case. Also, `ActionController::Parameters#compact` is deprecated in Rails 5.1 so we're using `reject { |_, value| value.nil? }` instead. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/boards/issues_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/boards/issues_controller.rb b/app/controllers/projects/boards/issues_controller.rb
index da9b789d617..653e7bc7e40 100644
--- a/app/controllers/projects/boards/issues_controller.rb
+++ b/app/controllers/projects/boards/issues_controller.rb
@@ -66,7 +66,8 @@ module Projects
end
def filter_params
- params.merge(board_id: params[:board_id], id: params[:list_id]).compact
+ params.merge(board_id: params[:board_id], id: params[:list_id])
+ .reject { |_, value| value.nil? }
end
def move_params