Referencing joins


Pretty much brand new to rails and am doing my first project with it.

I have created 3 tables. users, clubs and clubs_users.

I have the join table (clubs_users) gathering the user_id and club_id -
as it should. The thing I am trying to do is, on the users account page,
display all the clubs that they have created by referencing the user’s
id in the join table.

I just can’t work out the syntax to do that. I realise it is a really
simple task. Hopefully someone can shed some light on it for me?

Thanks guys,


This is (usually) a good link for “created_by” capabilities:

However it’s down - google cache to the rescue:


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs