diff options
author | Andrey Kumanyaev <me@zzet.org> | 2012-10-09 04:10:04 +0400 |
---|---|---|
committer | Andrey Kumanyaev <me@zzet.org> | 2012-10-09 04:10:04 +0400 |
commit | df7c52489a890ac38491682b4a3399beb7cdbc86 (patch) | |
tree | 9a81bee70285ac1e5a0c158eab5f4c981e49b86d /app/models/protected_branch.rb | |
parent | a635b9da97b0e104b8ac1a846344ec8a4abd3123 (diff) | |
download | gitlab-ce-df7c52489a890ac38491682b4a3399beb7cdbc86.tar.gz |
simple refactoring
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r-- | app/models/protected_branch.rb | 3 |
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 |