From 865534338277cf46ccbf25749abcad5f9f9c83d5 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 16 Sep 2020 23:48:10 -0700 Subject: [PATCH] Fix association --- app/models/party.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/party.rb b/app/models/party.rb index f0335c8..bdb7587 100644 --- a/app/models/party.rb +++ b/app/models/party.rb @@ -1,5 +1,5 @@ class Party < ApplicationRecord ##### ActiveRecord Associations belongs_to :user, optional: true - has_many :weapons, through: :grid_weapons -end + has_many :weapons, foreign_key: "party_id", class_name: "GridWeapon" +end \ No newline at end of file