HABTM question or :through association

Okay, we’ll I’ve been working on this crazy fun project (lol, maybe
fun when we’re done). We’re working on a registration system for
conventions [and sadly, not even getting paid :frowning: ], so I want to
ensure that we start off correctly before getting to far into
something broken.

We’ve got Models that are Attendees, Events, and Payments. That’s the
only simple part. After that, we have Attendees which are going to
Events, and events that belong to bigger events! Some events have
payments, some do not.

So - I was thinking is the best way to do this be a HABTM type of
thing. The inner table would reference something like “Attendences”
and have Attendee_id and Event_id.

Or would it be better to do something polymorphic. Have events be
attendable and payable. But then, I don’t think you have an Attendee
go to more than one event, right? Because I can’t picture how the
database would have that setup.

Or is there a more creative way that would mean to create a Model
called “Attendences” to tie Events, Attendees, and Payments
together… or would that not be necessary, because that’s probably
what HABTM.

Imagine we have a Person like this:

Person (“John”)
—> Event (“Anime Convention”)
----------> Payment (“John’s con payment”)
----------> Event (“Art Show”)
-----------------> Payments (“John’s art show payment”)

Any suggestions on the best way to implement this. Or maybe does
anyone have a plugin or example? Any help would be greatly
appreciated… we want to make some noise with this program, :slight_smile:


Well, I guess I’ll share that I think :through associations will
probably be my need, anybody concur or dissent?




Will it cause any trouble not calling it Event_person?