search for: cfacs

Displaying 1 result from an estimated 1 matches for "cfacs".

Did you mean: facs
2009 Aug 08
4
how to get id of other table
Hi All, I have a doubt regarding join tables I''m having 2 models 1)Fac 2)Cont and both models have " has and belong to many" relationships so there are 3 tables 1)facs 2)conts 3)conts_facs then i''m fetching the data in controller as @conts=Cont.find(:all]) @cfacs=Fac.all(:joins=>:conts, :select=>"facs.name") but i dont know how to get the cont_id in the join table from @cfacs example: for nd in @cfacs puts nd.cont_id end show me an error as "no method...