I’m planning out an application that will involve creating tickets and
assigning one or more staff to handle them, but I have a question about
the correct way to structure the relationships in Activerecord
The application is made up of Members and Staff, which are subtypes of
an STI User model. Either type of user can create a Ticket, but only
Staff can be assigned to them.
Here’s what I have so far, but I’m not sure if it created an infinite
has_many :tickets through :ticket_assignments
has_many :staff through :ticket_assignments
I have a feeling that the STI model for both User types is going to be
the kink in the chain. Should I break it out? Is there another way to
model this? Should I go with a habtm join instead?