add validations for boolean attributes
This commit is contained in:
parent
2680371785
commit
0b559cdece
5 changed files with 11 additions and 3 deletions
|
@ -104,6 +104,8 @@ class Project < ActiveRecord::Base
|
|||
length: { within: 1..255 }
|
||||
|
||||
validates :owner, presence: true
|
||||
validates :issues_enabled, :wall_enabled, :merge_requests_enabled,
|
||||
:wiki_enabled, inclusion: { in: [true, false] }
|
||||
validate :check_limit
|
||||
validate :repo_name
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue