Have just installed rails 2.2.2 My application has many has_many_trough
associtions. With rails 2.2.2 I got an error trying to access some of
them

Event Model
  has_many :people,:through => :participants
  has_many :participants
Person Model
  has_many :events,:through => :participants
  has_many :participants
Table participants has the fields, event_id, person_id, role

Now when I try this test
    @event=Event.find(:first)
    @event.people.each {|person|  puts 'EVENT '+person.name}

I got the error stack level too deep (concerns method missing)
debugging shows that is is the method each that is missing.
More debugging shows that @event.people seems not to be an array
When I try puts  @event.people  I got the error can't
convertActiveRecord::Associations::HasManyThroughAssociation into String

I did not have that error in rails 2.0 and it shows up only for some
has_many ass
Anyone that has had the same problem ?
Any work-arounds ?
Thanks or any help
-- 
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