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-07-29 01:26:16 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-17 18:58:57 +0300
commitb07c5f23b8761ae87d29ded1a69b14ae6393443a (patch)
treeec6d9812ae818c282480ef930c971462a203560f /app/models/list.rb
parent35420cec0bf511af662e09cbd8664720c58fa187 (diff)
Order board lists by list_type, and position
Diffstat (limited to 'app/models/list.rb')
-rw-r--r--app/models/list.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/list.rb b/app/models/list.rb
index 7b347c2255b..38cf2050527 100644
--- a/app/models/list.rb
+++ b/app/models/list.rb
@@ -2,9 +2,9 @@ class List < ActiveRecord::Base
belongs_to :board
belongs_to :label
- enum list_type: { label: 0, backlog: 1, done: 2 }
+ enum list_type: { backlog: 0, label: 1, done: 2 }
- validates :board, :list_type, :position, presence: true
- validates :label, presence: true, if: :label?
- validates :position, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
+ validates :board, :list_type, presence: true
+ validates :label, :position, presence: true, if: :label?
+ validates :position, numericality: { only_integer: true, greater_than_or_equal_to: 0 }, if: :label?
end