I have one table, called “people”.
Within this table, there are type “users”, “managers”… etc. So,
basic
STI.
Now, I want a “user” to have one manager, but a “manager” to have many
“users”.
Since I don’t want to use HABTM… how do I set this relationship up
seeing
that :has_one, :belongs_to and :has_many don’t
allow you to specify a :join_table ?
I can get the “has_one” part of the equation working using:
belongs_to :manager,
:class_name => “Client”,
:foreign_key => “assigned_manager”
… where “assigned_manager” is just a field with the “people” table…
but
I’m at a loss on how to specify the :has_many.
My assumption would be that I have to use HABTM in order to get the join
table recognized… but just need to ensure I’m not assigning
many managers to one user. Is this correct ?
Any clarification on this would be great.
Thank you !
Dylan