add validations for boolean attributes
This commit is contained in:
parent
2680371785
commit
0b559cdece
5 changed files with 11 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue