Actually i have raise same question yesterday, but no buddy response . Today i raise new topic and u response…
I will explain now
I am using has_and_belong_to_many association . This association will create third table automatically as per my
knowledge, and by chance i have deleted that table from mysql.
Now i wish to get that table but as i know there is no migration file is created when we use this type of Association.
And i dont want to create migration because than i am not following the rails rules.
And if i create migration than what is use of has_and_belongs_to_many association.
Refer my Yesterday question for better explaintion…
Hope u will understood now.
I have two models cow and milkman.
I am using has_and_belongs_to_many in both models .
By mistake i have deleted cows_milkmans table from database.
When i use this command i am getting error
a = Cow.last
a.milkmans # when i fire this command then i am getting error that cows_milkmans table not exist
As per my knowledge has_and_belongs_to_many will create third table automatically , no migration is needed.
How can get that table ?