Re: dynamically defined ar classes

Mike Schwab
Tue, 30 Jan 2007 18:09:11 -0000

I made a typo: each class should inherit from ActiveRecord::Base

> primaries.each do |primary|
>   class primary < ActiveRecord::Base
>     primaries.each { |p| has_many join_tables(primary, p); has_many p,
> :through => join_tables(primary, p) }
>   end
> end