Displaying 1 result from an estimated 1 matches for "suckup".
Did you mean:
fuckup
2006 May 14
2
object class with STI and Polymorphic Assoc''s.
Hi, lets say I have a a table, "Linkings" that I am using for
polymorphic associations. One of the associations is to the "person"
table, and there are several other associations.
"Person" has 2 types, "slacker" and "suckup".
It is modelled as such:
class Linking < ActiveRecord::Base
belongs_to :person
belongs_to :linkable, :polymorphic => true
end
class Person < ActiveRecord::Base
has_many :linkables
end
class Slacker < Person
end
class Yadda < Person
end
I''d like to have one con...