Use alias name in where clause
Use alias name in where clause

Fixes:
```
Version.joins(dependencies: :rubygem).where(rubygems: { name: "rails" })
Traceback (most recent call last):
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  invalid
reference to FROM-clause entry for table "rubygems")
LINE 1: ...dencies"."id" = "dependencies"."rubygem_id" WHERE
"rubygems"...
                                                             ^
HINT:  Perhaps you meant to reference the table alias
"rubygems_dependencies".
```

rubygems/rubygems.org,rubygems/rubygems.org,rubygems/rubygems.org,sonalkr132/rubygems.org,sonalkr132/rubygems.org,sonalkr132/rubygems.org,sonalkr132/rubygems.org,rubygems/rubygems.org