gitlabhq/app/observers/key_observer.rb

20 lines
312 B
Ruby
Raw Normal View History

class KeyObserver < ActiveRecord::Observer
2013-01-03 08:06:07 +01:00
include Gitolited
def after_save(key)
2013-01-28 20:02:10 +01:00
GitoliteWorker.perform_async(
2013-02-04 14:07:56 +01:00
:add_key,
key.shell_id,
2013-02-04 14:07:56 +01:00
key.key
2013-01-28 20:02:10 +01:00
)
end
def after_destroy(key)
2013-01-28 20:02:10 +01:00
GitoliteWorker.perform_async(
:remove_key,
key.shell_id,
2013-02-04 14:07:56 +01:00
key.key,
2013-01-28 20:02:10 +01:00
)
end
end