Nil when calling joins method on Model

I am trying to call the joins method on my model, but whenever I do,
it always returns nil.

I have the following database schema: