Let's say I had a relationship of Athlete's and Match's where each Match was a contest between two Athletes. Is it appropriate in this case to use HABTM or has_many through: or is it better to just store the two athlete id's in the Match model? Thanks!
I'm curious if this is the "right" approach for me to use for a particular portion of my application.
I have many tasks and many users. Tasks belong to a particular user, but can be completed by multiple users (defined by a manager role over another model).
Anyway, I want users to be able to opt-in/out of being reminded about certain tasks that they either own or manage.
My thought is to do a has_many :through relationship with a reminder join table.
My interface differs from the one in this railscast in that in the presentation of a task list, there would be just a single check box for each task that determines whether the current logged in user will get reminders for the task.
So I see lots of parallels to this railscast, but I can't seem to get to solution that doesn't feel cludgy. Am I on the right path?
Let's say I had a relationship of Athlete's and Match's where each Match was a contest between two Athletes. Is it appropriate in this case to use HABTM or has_many through: or is it better to just store the two athlete id's in the Match model? Thanks!
I'm curious if this is the "right" approach for me to use for a particular portion of my application.
I have many tasks and many users. Tasks belong to a particular user, but can be completed by multiple users (defined by a manager role over another model).
Anyway, I want users to be able to opt-in/out of being reminded about certain tasks that they either own or manage.
My thought is to do a has_many :through relationship with a reminder join table.
My interface differs from the one in this railscast in that in the presentation of a task list, there would be just a single check box for each task that determines whether the current logged in user will get reminders for the task.
So I see lots of parallels to this railscast, but I can't seem to get to solution that doesn't feel cludgy. Am I on the right path?
Thanks!