[Rails] Re: About joinTable

2009-08-06 Thread karthik k
On Thu, Aug 6, 2009 at 10:58 AM, Sniper Abandon rails-mailing-l...@andreas-s.net wrote: Karthik Kantharaj wrote: On Thu, Aug 6, 2009 at 10:43 AM, Sniper Abandon rails-mailing-l...@andreas-s.net wrote: 2 name2 1 1 please guide me has_many +

[Rails] Re: About joinTable

2009-08-05 Thread Sijo Kg
Hi Assume tables arenames, addresses So the junction table should be addresses_names by default This can be override if needed.. And the join table wont have id column This is has_and_belongs_to_many(HABTM) Have you setup relationships properly If so you can get all the

[Rails] Re: About joinTable

2009-08-05 Thread karthik k
On Thu, Aug 6, 2009 at 10:22 AM, Sijo Kg rails-mailing-l...@andreas-s.netwrote: Hi Assume tables arenames, addresses So the junction table should be addresses_names by default This can be override if needed.. And the join table wont have id column This is

[Rails] Re: About joinTable

2009-08-05 Thread Sniper Abandon
Karthik Kantharaj wrote: Hi Below Table1: name_table idname 1 name1 2 name2 Table2:address_table id address 1 address1 2address2 jointable :name_address name_idaddress_id 1

[Rails] Re: About joinTable

2009-08-05 Thread karthik k
On Thu, Aug 6, 2009 at 10:43 AM, Sniper Abandon rails-mailing-l...@andreas-s.net wrote: Karthik Kantharaj wrote: Hi Below Table1: name_table idname 1 name1 2 name2 Table2:address_table id address 1

[Rails] Re: About joinTable

2009-08-05 Thread Sniper Abandon
Karthik Kantharaj wrote: On Thu, Aug 6, 2009 at 10:43 AM, Sniper Abandon rails-mailing-l...@andreas-s.net wrote: 2 name2 1 1 please guide me has_many + :through hi Blade thank you I have explained my exact requirement in my previous mail I