summaryrefslogtreecommitdiff
path: root/app/models/namespace.rb
diff options
context:
space:
mode:
authorAndrew8xx8 <avk@8xx8.ru>2013-02-07 14:42:52 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-02-28 17:14:21 +0400
commit9f45e01e8426b9d678a210bb5237628676f99894 (patch)
tree1f8807a94a32eeceb5c90f39ca82018a519aa7b7 /app/models/namespace.rb
parent135418dcbf72d264a846649b95ea8e6d8a2aadcf (diff)
downloadgitlab-ce-9f45e01e8426b9d678a210bb5237628676f99894.tar.gz
Description to groups added
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 385fa291b48..992ead4fda7 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -4,6 +4,7 @@
#
# id :integer not null, primary key
# name :string(255) not null
+# description :string(255) not null
# path :string(255) not null
# owner_id :integer not null
# created_at :datetime not null
@@ -12,7 +13,7 @@
#
class Namespace < ActiveRecord::Base
- attr_accessible :name, :path
+ attr_accessible :name, :description, :path
has_many :projects, dependent: :destroy
belongs_to :owner, class_name: "User"
@@ -22,7 +23,7 @@ class Namespace < ActiveRecord::Base
length: { within: 0..255 },
format: { with: Gitlab::Regex.name_regex,
message: "only letters, digits, spaces & '_' '-' '.' allowed." }
-
+ validates :description, length: { within: 0..255 }
validates :path, uniqueness: true, presence: true, length: { within: 1..255 },
format: { with: Gitlab::Regex.path_regex,
message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" }