gitlabhq/app/observers/key_observer.rb
2013-02-05 11:12:15 +02:00

20 lines
312 B
Ruby

class KeyObserver < ActiveRecord::Observer
include Gitolited
def after_save(key)
GitoliteWorker.perform_async(
:add_key,
key.shell_id,
key.key
)
end
def after_destroy(key)
GitoliteWorker.perform_async(
:remove_key,
key.shell_id,
key.key,
)
end
end