When a scope has positional and keyword arguments on Ruby 3.0 or later, it raises ArgumentError.
scope :name_by, ->(name, deleted: false) {where(name: name, deleted: deleted)}
This is due to a breaking change in the keyword argument in Ruby 3.0.