summaryrefslogtreecommitdiff
path: root/app/models/protected_branch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r--app/models/protected_branch.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index c9e88d6bff6..cd93dc1bfe6 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -4,7 +4,8 @@ class ProtectedBranch < ActiveRecord::Base
attr_accessible :name
belongs_to :project
- validates_presence_of :name, :project_id
+ validates :name, presence: true
+ validates :project, presence: true
after_save :update_repository
after_destroy :update_repository