@almazkaist you can rewrite this line as:
```ruby
Project.joins(:tags).where(:tags => {:name => params[:tag]})
```
Also move this to scope.