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
path: root/app/roles
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-09-05 14:14:24 +0400
committerNihad Abbasov <narkoz.2008@gmail.com>2012-09-05 15:01:11 +0400
commit0b559cdece743269a7087c8206ab2cc587ec15f2 (patch)
tree4e3892e6c80a9c72a4a23ba561770d338d939cfe /app/roles
parent2680371785bfac1d0b76e5c4e53aa1074f743f84 (diff)
add validations for boolean attributes
Diffstat (limited to 'app/roles')
-rw-r--r--app/roles/issue_commonality.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/roles/issue_commonality.rb b/app/roles/issue_commonality.rb
index a8fd679df81..ac972a70df2 100644
--- a/app/roles/issue_commonality.rb
+++ b/app/roles/issue_commonality.rb
@@ -16,7 +16,7 @@ module IssueCommonality
validates :title,
presence: true,
length: { within: 0..255 }
-
+ validates :closed, inclusion: { in: [true, false] }
scope :opened, where(closed: false)
scope :closed, where(closed: true)