# Class KeyObserver < ActiveRecord::Observer

- app/observers/key_observer.rb

Methods

A
  - after_destroy,
  - after_save

Included Modules

- GitHost

Instance Public methods
after_destroy(key) Link

Source: show

    # File app/observers/key_observer.rb, line 8
    def after_destroy(key)
      return if key.is_deploy_key && !key.last_deploy?
      git_host.remove_key(key.identifier, key.projects)
    end

after_save(key) Link

Source: show

    # File app/observers/key_observer.rb, line 4
    def after_save(key)
      git_host.set_key(key.identifier, key.key, key.projects)
    end