# Relationships

**URL:** <https://discuss.rubyonrails.org/t/relationships/3020>\
**Category:** rubyonrails-talk\
**Created:** [October 13, 2006, 1:52am UTC](https://discuss.rubyonrails.org/t/relationships/3020 "2006-10-13T01:52:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_robot](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@mr\_robot](https://discuss.rubyonrails.org/u/mr_robot)\
**Post date:** [October 13, 2006, 1:52am UTC](https://discuss.rubyonrails.org/t/relationships/3020/1 "2006-10-13T01:52:11Z")

</div>

I have a model User who has many Posts I now want a user to be able to group one of his posts with any posts from any user.

so i have a Groups model. in the groups database i have: user\_id and post\_id

Groups: has\_one :user has\_one :post

Posts: has\_many :groups

so i pull out a post from a user. how can i find what other posts are grouped to that post?
