Thank you Ar Chron! This is exactly what I was looking for.

I appreciate the other answers, but those reading this thread should
notice that the case I described could not be solved without this
"role" attribute in the participation model.

This was the missing piece. Thank you!

On 3 set, 13:21, Ar Chron <[email protected]> wrote:
> > Any idea of how to approach this?
>
> Sounds like Users, Sandboxes, and Participations - the main point being
> a full join table (participation) with additional attributes
>
> User
> has_many :participations
> has_many :sandboxes, :through => :participations
>
> Sandbox
> has_many :participations
> has_many :users, :through => :participations
>
> Participation
> user_id
> sandbox_id
> role  (which is user, or admin, or donkey, or whatever)
> belongs_to :user
> belongs_to :sandbox
>
> Or something along those lines...
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to