summaryrefslogtreecommitdiff
path: root/app/models/namespace.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/namespace.rb
parentc427bf08e41342957632289e084604f53e65e353 (diff)
downloadgitlab-ce-cc39bca3fa71930421f1c46844b4d02d5ff93e8b.tar.gz
Rubocop: Style/AlignHash enabled
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb21
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