Hey I am working on task reminder application where users can collaborate and complete tasks (something like trello).
I have tables - users, avatars, tasks, collaborators.
I actaully need to render collab requests sent by other users.
Something like this.
I want to do joins so that I can get images of users.
I am able to get all the data except user avatar from avatar table.
Iam using active storage to store images
I am performing joins like this
@collab_requests = Task.joins(:user, :collaborators)
.select("collaborators.id, tasks.id as taskId, tasks.title, tasks.end_date, users.full_name, users.avatar_id")
.where("collaborators.user_id = 3")
Have a look at my database