Rails has_many_through migration
问题 I'm creating a many_to_many association for the following models: class Competence < ActiveRecord::Base has_many :behaviour, through: :behaviours_rel has_many :stabilizer, through: :stabilizers_rel end class Behaviour < ActiveRecord::Base belongs_to :competence end class Stabilizer < ActiveRecord::Base belongs_to :competence end I believe I have to do something like: rails generate migration behaviour:belongs_to but it doesn't work. I simply can't get the logic of doing this migration with