2011-10-13 16:55:03 +01:00
|
|
|
class ProjectToRepository < ActiveRecord::Base
|
|
|
|
belongs_to :project
|
|
|
|
belongs_to :repository
|
2011-10-28 12:16:32 +01:00
|
|
|
|
|
|
|
delegate :path, :to => :project
|
2011-10-19 14:14:53 +01:00
|
|
|
|
2011-11-03 20:41:06 +00:00
|
|
|
after_create lambda { project.xml_rpc_create(repository) }, :unless => lambda {Thread.current[:skip]}
|
2011-10-30 12:54:10 +00:00
|
|
|
after_destroy lambda { project.xml_rpc_destroy(repository) }
|
2011-11-23 15:52:33 +00:00
|
|
|
# after_rollback lambda { project.xml_rpc_destroy(repository) rescue true if new_record? }
|
2011-10-13 16:55:03 +01:00
|
|
|
end
|