イベント (基本的には投稿) と呼ばれるものがありますが、それらにはさまざまな種類 (「種類」) があるため、レイアウトのどこに配置するかを分類するのに役立ちます。とにかく、イベント/編集ページに移動すると、次のエラーが表示されます。
Mysql2::エラー: 'where 句' の不明な列 'event_kinds.event_id': SELECT event_kinds
.* FROM event_kinds
WHERE event_kinds
. event_id
= 1 リミット 1
協会の問題かもしれないと思ったのですが、そうですか?
EventKind has_many :events
Event has_one :event_kind
?
編集: event_kinds の名前を kind に変更しました。現在、イベントと種類のモデルをリンクする event_kinds というテーブルはありません。各イベントは 1 つの種類にしかできないため、イベント テーブル内に種類 ID を入れるだけです。events_kind をスキップできる方法はありますか...