So this new STI :through thing is still not clear to me. I have a
project now where I’m using this:
class List < ActiveRecord::Base
belongs_to :user
end
class StaticList < List
has_and_belongs_to_many :items
end
In the script/console:
StaticList.create
NameError: uninitialized constant StaticList
What? ok, fine. So a List.create would be in order, except no matter
what is passed into :type =>, it ends up with “List” in the database’s
type column. Is there a better way to model this with the :through
feature? Why isn’t rails finding the StaticList class? Is this a bug? A
feature? The definition is in the same file as class List…
Thanks for any pointers,
–
Matthew B. :: [email protected]
Resume & Portfolio @ http://madhatted.com