Hi all,

When I have
class User
:has_many :events
end

class Event
:belongs_to :user
end

class Game < Event
end

Why Can't I do:
user = User.find(1)
user.games.build(params[:game])

I need to add to
class Game < Event
:belongs_to :user
end
and
class User
:has_many :events
:has_many :users
end

then
user = User.find(1)
user.games.build(params[:game])
will work.

Since Event already belongs_to user shoiuld game than also since it
inherites?

Regards,
Stijn










--~--~---------~--~----~------------~-------~--~----~
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