debian-mirror-gitlab/app/models/board.rb
2017-08-17 22:00:37 +05:30

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