Commit 82b87ae5 authored by charlieablett's avatar charlieablett

Compound lists scopes to preserve ordering

parent 5aaef133
......@@ -5,7 +5,7 @@ class Board < ApplicationRecord
belongs_to :project
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 :group, presence: true, unless: :project
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment