diff --git a/app/models/party.rb b/app/models/party.rb index 8eaf233..122a5d0 100644 --- a/app/models/party.rb +++ b/app/models/party.rb @@ -8,6 +8,8 @@ class Party < ApplicationRecord has_many :weapons, foreign_key: "party_id", class_name: "GridWeapon", dependent: :destroy has_many :summons, foreign_key: "party_id", class_name: "GridSummon", dependent: :destroy + attr_accessor :favorited + def is_favorited(user) user.favorite_parties.include? self end