Re: User and Game Association help.

Christopher Jones
2012-02-01T11:39:12Z

> If you have a user, current_user for example, then his games will be
> current_user.games.

At the moment I have under the profile @user.games that should return
all games associated with that particular user but no results.

I would like it so that when a new game is added it will associate
itself with the current logged in user rather than entering the
username. Would I have to do this as part of the _form.html.erb input
for games or must this be declared in a model?

All help will be greatly appreciated.

--
Posted via http://www.ruby-forum.com/.