I just want to make sure I’m on the right track but when creating the migration for a HABTM that is using the same name like:
class Dog < ActiveRecord::Base
has_and_belongs_to_many :dog_categories
end
class DogCategory < ActiveRecord::Base
has_and_belongs_to_many :dogs
end
i’m thinking this…….
rails g migration dogs_dog_categories dog_id:integer dog_category_id:integer
This looks strange to me but is this how the migration/table should look?
According to rails guide:
So, I think it should be
dog_categories_dogs