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:
IE, get ALL domains for all websites in Account 1
The code above doesn’t work because of the multiple find(:all)
I could do it using :joins and :conditions I guess but then I lose other
useful stuff like attributes matching column names in the database.