rosa-build/app/models/project_to_repository.rb

11 lines
396 B
Ruby
Raw Normal View History

class ProjectToRepository < ActiveRecord::Base
belongs_to :project
belongs_to :repository
delegate :path, :to => :project
2011-10-19 14:14:53 +01:00
after_create lambda { project.xml_rpc_create(repository) }, :unless => lambda {Thread.current[:skip]}
after_destroy lambda { project.xml_rpc_destroy(repository) }
# after_rollback lambda { project.xml_rpc_destroy(repository) rescue true if new_record? }
end