It is much better to do the filtering in the database, rather than shipping the whole list of projects back and forth between DB and app:
```Ruby
Project.where(id: [project_ids])
```