gitlab-org--gitlab-foss/app/models/board.rb
2017-03-24 23:40:35 +11:00

11 lines
236 B
Ruby

class Board < ActiveRecord::Base
belongs_to :project
has_many :lists, -> { order(:list_type, :position) }, dependent: :delete_all
validates :project, presence: true
def closed_list
lists.merge(List.closed).take
end
end