Compound lists scopes to preserve ordering
This commit is contained in:
parent
5aaef1334d
commit
82b87ae509
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ class Board < ApplicationRecord
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
|
||||||
has_many :lists, -> { order(:list_type, :position) }, dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent
|
has_many :lists, -> { order(:list_type, :position) }, dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent
|
||||||
has_many :destroyable_lists, -> { destroyable }, class_name: "List"
|
has_many :destroyable_lists, -> { lists.destroyable }, class_name: "List"
|
||||||
|
|
||||||
validates :project, presence: true, if: :project_needed?
|
validates :project, presence: true, if: :project_needed?
|
||||||
validates :group, presence: true, unless: :project
|
validates :group, presence: true, unless: :project
|
||||||
|
|
Loading…
Reference in a new issue