key_observer.rb 312 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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