n:m self-join with ruby on rails active record
问题 I'm trying to accomplish the following with ruby on rails, and I have problems to get the model-configuration right: I would like to model possible connections between airports. I created the following models: > rails generate model airport city name > rails generate model connection airport_id destination_id But most of the n:m association examples deal with associations between two different models on the one hand, or self-referencing models on the other hand, but I want to model a n:m