2016-07-27 15:32:32 -04:00
|
|
|
class Board < ActiveRecord::Base
|
|
|
|
belongs_to :project
|
|
|
|
|
2016-07-31 19:48:00 -04:00
|
|
|
has_many :lists, -> { order(:list_type, :position) }, dependent: :delete_all
|
2016-07-27 15:32:32 -04:00
|
|
|
|
|
|
|
validates :project, presence: true
|
2016-09-26 13:39:41 -04:00
|
|
|
|
|
|
|
def done_list
|
|
|
|
lists.merge(List.done).take
|
|
|
|
end
|
2016-07-27 15:32:32 -04:00
|
|
|
end
|