diff --git a/app/models/party.rb b/app/models/party.rb index 4db8518..19f7dc1 100644 --- a/app/models/party.rb +++ b/app/models/party.rb @@ -7,9 +7,9 @@ class Party < ApplicationRecord foreign_key: :source_party_id, optional: true - has_many :derivative_parties, + has_many :remixes, -> { order(created_at: :desc) }, class_name: 'Party', - foreign_key: :source_party_id, + foreign_key: 'source_party_id', inverse_of: :source_party, dependent: :nullify @@ -106,8 +106,6 @@ class Party < ApplicationRecord validate :skills_are_unique validate :guidebooks_are_unique - attr_accessor :favorited - self.enum :preview_state, { pending: 0, queued: 1,