2016-09-13 17:45:13 +05:30
|
|
|
class Board < ActiveRecord::Base
|
|
|
|
belongs_to :project
|
|
|
|
|
|
|
|
has_many :lists, -> { order(:list_type, :position) }, dependent: :delete_all
|
|
|
|
|
|
|
|
validates :project, presence: true
|
2016-11-03 12:29:30 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
def closed_list
|
|
|
|
lists.merge(List.closed).take
|
2016-11-03 12:29:30 +05:30
|
|
|
end
|
2016-09-13 17:45:13 +05:30
|
|
|
end
|