diff options
author | Rémy Coutable <remy@rymai.me> | 2017-08-01 11:40:41 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-01 17:07:05 +0300 |
commit | f67c7a4da6eb7e363f5433df74016f234999c467 (patch) | |
tree | 6dcc54e8f7aa0f4589c8cafd52b70ebf8bda2ac2 /app/controllers/projects | |
parent | e753444c7341bb9c327aaf7db69a4e612bff0449 (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.rb | 3 |
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 |