@docwhat what about?
``` ruby
scope :in_projects, ->(projects) { where(project_id: projects) }
```

result must be like

``` sql
select * from projects where project_id in (ids)
```