How to create rails associations like this:

and example will show like this:

How to create rails associations like this:

and example will show like this:

On
You are very close to built the association,and your question is very straightforward. Simply add a field skill_id in model TypeSkill rather skill_model.
And write a simple association into your models
In Skill modle
has_many :type_skills # based on you requirement has_many or has_one
In TypeSkill model
belongs_to :skill
I'd assume you have a
userstable first, and eachUserobjecthas_oneorhas_manyskill_setorskill_setsrespectively.And for table,
skill_sets:And, in Rails, you could model it like following:
For migrations, I'd have something like:
And I don't understand, why are you using the table
skillsif you all you have do is to store 3 rows. You can have something like the following in your model: