• Stan Hu's avatar
    Make Admin::UsersController work with Ruby 2.6 · e87c255d
    Stan Hu authored
    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_items`.
    e87c255d
users_controller_spec.rb 8.13 KB