はじめに 初めての Rails でいろいろ四苦八苦しながらやったのでまとめます。 テーブル関係 まずは今回使用するテーブルの説明から apps id name created_at updated_at categories id name created_at updated_at app_categories (これが今回の中間テーブルになります) id app_id category_id model の実装 ココらへんは入門書をよみながらかけたので割りとさくさく進められますた。 この accepts_nested_attributes_for ってのが結構肝になるっぽい