Make Admin::UsersController work with Ruby 2.6
Ruby 2.6 introduced Enumerable#filter
, which takes no arguments.
Attempting to call filter
on an ActiveRecord::Relation
with a scope
will fail with a wrong number of arguments (given 1, expected 0)
message
because the Enumerable#filter
implementation overrides the
delegated ActiveRecord::Relation#filter
method.
To make Admin::UsersController
compatible with Ruby 2.6, rename User.filter
to User.filter_item
to avoid an ambiguous call.
Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/57323
Edited by Stan Hu