diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-05 14:14:24 +0400 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-05 15:01:11 +0400 |
commit | 0b559cdece743269a7087c8206ab2cc587ec15f2 (patch) | |
tree | 4e3892e6c80a9c72a4a23ba561770d338d939cfe /app/roles | |
parent | 2680371785bfac1d0b76e5c4e53aa1074f743f84 (diff) |
add validations for boolean attributes
Diffstat (limited to 'app/roles')
-rw-r--r-- | app/roles/issue_commonality.rb | 2 |
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) |