This question seems to have been asked many times before, but I didn't see it satisfactorily answered anywhere.
I have three tables/models:
skill
----------------------------------
id
label
user
----------------------------------
id
username
(many other irrelevant attributes)
user_skill
----------------------------------
id
user_id
skill_id
current_proficiency_level
interest_level
So each user has any number of skills, and each user can indicate how proficient he is with that skill right now (maybe I'm a 2 with PHP) and then what your interest level is (but maybe I want to learn PHP, so my interest level is an 8).
I'm wondering what the simplest, "most default" way of saving these UserSkill
records is.
Let's not worry right now about the format in which my User
object is getting the UserSkill
records. Let's just assume that I have some user and I want to save, say, 10 UserSkill
records when I save my User
object. How would I do that?
(By the way, I'm reasonably well-versed with Rails in general, I just haven't bothered yet to figure out the "right" way to do this kind of save. So if you reference other Rails terms/practices, I'll probably know what you're talking about.)