2013-03-26 18:11:38 +02:00
|
|
|
class SystemHookObserver < BaseObserver
|
2012-07-20 01:01:29 +03:00
|
|
|
observe :user, :project, :users_project
|
2013-02-20 13:15:56 +04:00
|
|
|
|
2012-07-20 01:01:29 +03:00
|
|
|
def after_create(model)
|
2013-02-20 14:53:15 +04:00
|
|
|
SystemHooksService.execute_hooks_for(model, :create)
|
2012-07-20 01:01:29 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
def after_destroy(model)
|
2013-02-20 14:53:15 +04:00
|
|
|
SystemHooksService.execute_hooks_for(model, :destroy)
|
2012-07-20 01:01:29 +03:00
|
|
|
end
|
|
|
|
end
|