simple refactoring

This commit is contained in:
Andrey Kumanyaev 2012-10-09 04:10:04 +04:00
parent a635b9da97
commit df7c52489a
21 changed files with 276 additions and 264 deletions

View file

@ -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