[refs #523] limit callback only for create action

This commit is contained in:
Vladimir Sharshov 2012-07-12 00:24:31 +04:00
parent b22a2ce3ba
commit 84f4d7d423
1 changed files with 2 additions and 2 deletions

View File

@ -42,11 +42,11 @@ class Project < ActiveRecord::Base
after_create :attach_to_personal_repository
after_create :create_git_repo
after_save :create_wiki
after_commit {|p| p.fork_git_repo unless p.is_root?} # later with resque
after_commit {|p| p.fork_git_repo unless p.is_root?}, :on => :create # later with resque
after_destroy :destroy_git_repo
after_destroy :destroy_wiki
after_commit {|p| p.import_attached_srpm if p.srpm?} # later with resque # should be after create_git_repo
after_commit {|p| p.import_attached_srpm if p.srpm?}, :on => :create # later with resque # should be after create_git_repo
# after_rollback lambda { destroy_git_repo rescue true if new_record? }
has_ancestry