I am on Rails 2.0.2 (not 2.1.x due to a couple of tickets) and if this
topic is invalid if only I upgraded, please excuse me for not being able
to have a perfect overview :(

My use case is: users are invited to events - and each event is
scheduled to 'perform' a number of times. This gives me the tables:
users, scheduled_events, event_users.

I have set up associations on the models like this:

- events has_many scheduled_events
- scheduled_events belongs_to event
- event_users belongs_to event and belongs_to user

Then I've tried to set up an association providing me with the scheduled
events to an invited user like this

- event_users has_many scheduled_events through event

But after googling about for the better part of a day and reading Josh
Susser extensively, I am lead to believe that has_many through only
works on has_many associations - ie. I'm not at liberty to go through a
belongs_to association.

Does anyone here have a take on how to solve this? Or am I perhaps just
messing this association thing up?

best regards,
Walt
-- 
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 [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