I have this issue on RoR associations: have a ‘has many’ relationship
cascade, on many levels. I need to display data across multiple tables,
sort like a ‘sql table view’. I could accomplish this only up to a
second level association, like in the below example.
class Planet < ActiveRecord::Base
has_many :countries, :through => :continents
class Continents < ActiveRecord::Base
class Country < ActiveRecord::Base
How can I do this further on, but with a larger number of tables (say A
has many Bs that has many Cs that has many Ds etc…)?