Re: [Rails] Find All records with associated records

2016-04-12 Thread Colin Law
On 12 April 2016 at 08:17, Naveed Alam wrote: > Hi, > > Using rails 4, I have two models Supplier and Category > > Category belongs_to Supplier > > and Supplier has_many categories > > > now the suppliers table has fields, company_name, address, phone etc. > and id > > and the categories has cat_n

[Rails] Find All records with associated records

2016-04-12 Thread Naveed Alam
Hi, Using rails 4, I have two models Supplier and Category Category belongs_to Supplier and Supplier has_many categories now the suppliers table has fields, company_name, address, phone etc. and id and the categories has cat_name and supplier_id in the categories index view I want to display