jeudi 14 avril 2016

Rails query based on HABTM match

I am trying to query a Conversation based on the users that are in the HABTM relationship. I have conversations, users, and conversations_users tables and need to grab the conversations based on the users that are in the conversation.

The Conversation model contains a HABTM relationship to :users.

Aucun commentaire:

Enregistrer un commentaire