summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2012-01-03 23:39:03 +0200
committerValery Sizov <vsv2711@gmail.com>2012-01-03 23:39:03 +0200
commit212f400d678d75068ae1a5c57110f273464e6ec1 (patch)
treea397e04762cb23facc294f8c1ea1132563ab59c3 /app
parent8d7aaf0e5501c472504467b9252dd5bde14a98c8 (diff)
downloadgitlab-ce-212f400d678d75068ae1a5c57110f273464e6ec1.tar.gz
fix bug #322
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb6
-rw-r--r--app/models/web_hook.rb11
2 files changed, 17 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 8b136de90cf..a13a6f77870 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -34,6 +34,11 @@ class User < ActiveRecord::Base
:foreign_key => :assignee_id,
:dependent => :destroy
+ validates :projects_limit,
+ :presence => true,
+ :numericality => {:greater_than_or_equal_to => 0}
+
+
before_create :ensure_authentication_token
alias_attribute :private_token, :authentication_token
scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) }
@@ -82,5 +87,6 @@ end
# linkedin :string(255) default(""), not null
# twitter :string(255) default(""), not null
# authentication_token :string(255)
+# dark_scheme :boolean default(FALSE), not null
#
diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb
index 0058bd57b91..40b930c3a98 100644
--- a/app/models/web_hook.rb
+++ b/app/models/web_hook.rb
@@ -18,3 +18,14 @@ class WebHook < ActiveRecord::Base
# There was a problem calling this web hook, let's forget about it.
end
end
+# == Schema Information
+#
+# Table name: web_hooks
+#
+# id :integer not null, primary key
+# url :string(255)
+# project_id :integer
+# created_at :datetime
+# updated_at :datetime
+#
+