gitlabhq/app/observers/key_observer.rb

20 lines
318 B
Ruby
Raw Normal View History

class KeyObserver < ActiveRecord::Observer
2013-01-03 09:06:07 +02:00
include Gitolited
def after_save(key)
2013-02-11 19:27:26 +02:00
GitlabShellWorker.perform_async(
2013-02-04 15:07:56 +02:00
:add_key,
key.shell_id,
2013-02-04 15:07:56 +02:00
key.key
2013-01-28 21:02:10 +02:00
)
end
def after_destroy(key)
2013-02-11 19:27:26 +02:00
GitlabShellWorker.perform_async(
2013-01-28 21:02:10 +02:00
:remove_key,
key.shell_id,
2013-02-04 15:07:56 +02:00
key.key,
2013-01-28 21:02:10 +02:00
)
end
end