im doing a many to many association with my models i belive after i did this:
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 have to do a migration something like
rails generate migration behaviour:belongs_to
but it doesnt work i dont get the logic of doing this migration with rails generate
im trying to save in a competence serveral behaviours so a one to many rel is not enought
btw i dont want to explicitly do with sql the table so is there a way to do this migration in rails?