search for: website_domain

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

Did you mean: website_domains
2006 Jan 17
9
using "find" when you have 2 has_many relations
An Account has_many Websites which in turn has_many WebsiteDomains Now I can of course do this: @domains = Account.find(1).websites.find(1).website_domains.find(:all) To get all the domains for Account with id 1 and Website with id 1. I would like to do something like this though: @domains = Account.find(1).websites.find(:all).website_domains.find(:all) IE, get ALL domains for all websites in Account 1 The code above doesn''t work because o...