From bb736ce084567c7185bbf1b77ceceba4b6af2615 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 23 Feb 2022 18:11:03 -0800 Subject: [PATCH] Add Raid model and add Parties as belonging to Raids --- app/models/party.rb | 1 + app/models/raid.rb | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 app/models/raid.rb diff --git a/app/models/party.rb b/app/models/party.rb index a9a0e23..f11eebc 100644 --- a/app/models/party.rb +++ b/app/models/party.rb @@ -1,6 +1,7 @@ class Party < ApplicationRecord ##### ActiveRecord Associations belongs_to :user, optional: true + belongs_to :raid, optional: true has_many :characters, foreign_key: "party_id", class_name: "GridCharacter", dependent: :destroy has_many :weapons, foreign_key: "party_id", class_name: "GridWeapon", dependent: :destroy has_many :summons, foreign_key: "party_id", class_name: "GridSummon", dependent: :destroy diff --git a/app/models/raid.rb b/app/models/raid.rb new file mode 100644 index 0000000..c1065ee --- /dev/null +++ b/app/models/raid.rb @@ -0,0 +1,2 @@ +class Raid < ApplicationRecord +end