Update party.rb
- Removes favorited accessor - Renames derivative_parties to remixes and adds in-built sort
This commit is contained in:
parent
d7f11e3ca5
commit
f1590ab981
1 changed files with 2 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue