gitlab-org--gitlab-foss/app/observers/key_observer.rb
2013-02-11 19:27:26 +02:00

19 lines
318 B
Ruby

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