[Rails] Re: Association through 2 intermediate Models

2009-02-27 Thread Tonypm
perhaps the responses could be a bit more helpful here? sol, I have done it through 2 level associations using through eg. Sites has_many :feed_entries, :through=:feeds I have tried with 3 levels, but never got it to work, ie, how do you chain the throughs. I have tried to make sure that

[Rails] Re: Association through 2 intermediate Models

2009-02-27 Thread Pardee, Roy
I don't know if you can get there just w/HM=T, but you can fake out the last link w/a custom method. This is working for me: class Article ActiveRecord::Base belongs_to :feed_entry end class FeedEntry ActiveRecord::Base belongs_to :feed has_many :articles end class Feed

[Rails] Re: Association through 2 intermediate Models

2009-02-25 Thread sol
sorry, what? On Feb 25, 1:55 pm, Priya Buvan rails-mailing-l...@andreas-s.net wrote: you can use through na.. -- Posted viahttp://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Association through 2 intermediate Models

2009-02-25 Thread sol
Hi, On Feb 25, 2:34 pm, Conrad Taylor conra...@gmail.com wrote: Hi, I recommend reading AWDwR 3ed on using 'has_many through' for the details. These details are the reason I'm asking :) is this: http://agilewebdevelopment.com/plugins/nested_has_many_through still the only way to do this? or