system_hook_observer.rb 278 Bytes
Newer Older
1 2
class SystemHookObserver < ActiveRecord::Observer
  observe :user, :project, :users_project
3

4
  def after_create(model)
5
    SystemHooksService.execute_hooks_for(model, :create)
6 7 8
  end

  def after_destroy(model)
9
    SystemHooksService.execute_hooks_for(model, :destroy)
10 11
  end
end