Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-09-26 20:39:41 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-09-26 20:42:38 +0300
commit97551e8dd9dc5711951e865e7f9875f8cd5712ac (patch)
tree44deb1670b6d2e757318e7e3ca00079ad75914df /app/models/board.rb
parent10d3696f782eb3ecdfad7ef57c9c8757dc61364a (diff)
Improve project_with_board factory to create the default lists
Diffstat (limited to 'app/models/board.rb')
-rw-r--r--app/models/board.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/board.rb b/app/models/board.rb
index 3240c4bede3..c56422914a9 100644
--- a/app/models/board.rb
+++ b/app/models/board.rb
@@ -4,4 +4,12 @@ class Board < ActiveRecord::Base
has_many :lists, -> { order(:list_type, :position) }, dependent: :delete_all
validates :project, presence: true
+
+ def backlog_list
+ lists.merge(List.backlog).take
+ end
+
+ def done_list
+ lists.merge(List.done).take
+ end
end