I have models called `project`, `gold_task` and `submissions`.

Relationship goes like this:

`project has_many gold_tasks`

`gold_tasks has_many submissions`

How can i get all the submissions of a gold\_task through project id.

I tried in the below way

`p.gold_tasks.joins(:submissions)`

Here i'm getting all gold\_tasks but i need all submissions.

Thanks in advance.