Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-09-27 10:20:36 +0400
committerNihad Abbasov <narkoz.2008@gmail.com>2012-09-27 13:05:53 +0400
commit841e4fbd08d2d642c127506001a76a973ea3d536 (patch)
tree56a894ecdf3978bc3032daa8fae294dad897018d /app/models/protected_branch.rb
parent2a4359a572c123d117988487f9bb29f4ae176ceb (diff)
cosmetical cleanup of models
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r--app/models/protected_branch.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index 421828645c0..c9e88d6bff6 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -4,8 +4,7 @@ class ProtectedBranch < ActiveRecord::Base
attr_accessible :name
belongs_to :project
- validates_presence_of :project_id
- validates_presence_of :name
+ validates_presence_of :name, :project_id
after_save :update_repository
after_destroy :update_repository
@@ -18,6 +17,7 @@ class ProtectedBranch < ActiveRecord::Base
project.commit(self.name)
end
end
+
# == Schema Information
#
# Table name: protected_branches
@@ -28,4 +28,3 @@ end
# created_at :datetime not null
# updated_at :datetime not null
#
-