diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 21:15:44 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 21:15:44 -0800 |
commit | cc39bca3fa71930421f1c46844b4d02d5ff93e8b (patch) | |
tree | f9a600dee04bca35f0319a64ce23bdff7ea724d9 /app/models/namespace.rb | |
parent | c427bf08e41342957632289e084604f53e65e353 (diff) | |
download | gitlab-ce-cc39bca3fa71930421f1c46844b4d02d5ff93e8b.tar.gz |
Rubocop: Style/AlignHash enabled
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index ea4b48fdd7f..e7fd3024750 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -20,15 +20,20 @@ class Namespace < ActiveRecord::Base belongs_to :owner, class_name: "User" validates :owner, presence: true, unless: ->(n) { n.type == "Group" } - validates :name, presence: true, uniqueness: true, - length: { within: 0..255 }, - format: { with: Gitlab::Regex.name_regex, - message: Gitlab::Regex.name_regex_message } + validates :name, + presence: true, uniqueness: true, + length: { within: 0..255 }, + format: { with: Gitlab::Regex.name_regex, + message: Gitlab::Regex.name_regex_message } + validates :description, length: { within: 0..255 } - validates :path, uniqueness: { case_sensitive: false }, presence: true, length: { within: 1..255 }, - exclusion: { in: Gitlab::Blacklist.path }, - format: { with: Gitlab::Regex.path_regex, - message: Gitlab::Regex.path_regex_message } + validates :path, + uniqueness: { case_sensitive: false }, + presence: true, + length: { within: 1..255 }, + exclusion: { in: Gitlab::Blacklist.path }, + format: { with: Gitlab::Regex.path_regex, + message: Gitlab::Regex.path_regex_message } delegate :name, to: :owner, allow_nil: true, prefix: true |