Referencing joins

Hi,

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,

3quid

This is (usually) a good link for “created_by” capabilities:
http://wiki.rubyonrails.org/rails/pages/Howto+Add+created_by+and+updated_by

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

http://72.14.253.104/search?q=cache:5PvfMB1Z8EcJ:wiki.rubyonrails.org/rails/pages/Howto%2BAdd%2Bcreated_by%2Band%2Bupdated_by+ruby+on+rails+created_by&hl=en&ct=clnk&cd=1&gl=us&client=firefox-a

m

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