summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-02 21:15:44 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-02 21:15:44 -0800
commitcc39bca3fa71930421f1c46844b4d02d5ff93e8b (patch)
treef9a600dee04bca35f0319a64ce23bdff7ea724d9 /app/models/project.rb
parentc427bf08e41342957632289e084604f53e65e353 (diff)
downloadgitlab-ce-cc39bca3fa71930421f1c46844b4d02d5ff93e8b.tar.gz
Rubocop: Style/AlignHash enabled
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index f314ed9bd25..cfe40553ab5 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -108,13 +108,17 @@ class Project < ActiveRecord::Base
# Validations
validates :creator, presence: true, on: :create
validates :description, length: { maximum: 2000 }, allow_blank: true
- validates :name, presence: true, length: { within: 0..255 },
- format: { with: Gitlab::Regex.project_name_regex,
- message: Gitlab::Regex.project_regex_message }
- validates :path, presence: true, length: { within: 0..255 },
- exclusion: { in: Gitlab::Blacklist.path },
- format: { with: Gitlab::Regex.path_regex,
- message: Gitlab::Regex.path_regex_message }
+ validates :name,
+ presence: true,
+ length: { within: 0..255 },
+ format: { with: Gitlab::Regex.project_name_regex,
+ message: Gitlab::Regex.project_regex_message }
+ validates :path,
+ presence: true,
+ length: { within: 0..255 },
+ exclusion: { in: Gitlab::Blacklist.path },
+ format: { with: Gitlab::Regex.path_regex,
+ message: Gitlab::Regex.path_regex_message }
validates :issues_enabled, :merge_requests_enabled,
:wiki_enabled, inclusion: { in: [true, false] }
validates :visibility_level,