wall. I am quite new to Rails so at the moment only know a little bit
I have a users table and a games table. At the moment I am able to enter
in user information as well as add new games to the games table.
What I wish to do now is to combine the both using a foreign key. I have
added the user_id entry to the games table and even declared it as a
foreign key by writing it as a command through MySQL. I have also
declared them as followed:
model Games < ActiveRecord::Base
model User < ActiveRecord::Base
Is there anything else I must do. I want to be able to on the user
profile show all games associated with that particular user. How would I
go about doing this?
Any help would be greatly appreciated.
Posted via http://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 firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.