Aテーブル
Bテーブル
C中間テーブルを作りました
Aテーブル
class A < ApplicationRecord
has_many :Cテーブル
has_many :Bテーブル, through: :Cテーブル
validates :name, uniqueness: true
end
```
````rb:Bテーブル
class B < ApplicationRecord
has_many :Aテーブル, through: :Cテーブル
has_many :Cテーブル
end
```
Bのテーブルで問題発生しています

雰囲気の訳)先にCテーブルとのアソシエーションを書いて、次に中間テーブルを設定しないと順番が変なのでCテーブルを通してAテーブルとなんていう記述はできませんといっています。
````rb:(修正)Bテーブル
class B < ApplicationRecord
has_many :Cテーブル
has_many :Aテーブル, through: :Cテーブル
end
```