class ProjectObserver

Public Instance Methods

after_create(project) click to toggle source
# File app/observers/project_observer.rb, line 12
def after_create project
  log_info("#{project.owner.name} created a new project \"#{project.name}\"")
end
after_destroy(project) click to toggle source
# File app/observers/project_observer.rb, line 6
def after_destroy(project)
  log_info("Project \"#{project.name}\" was removed")

  project.destroy_repository
end
after_save(project) click to toggle source
# File app/observers/project_observer.rb, line 2
def after_save(project)
  project.update_repository
end

Protected Instance Methods

log_info(message) click to toggle source
# File app/observers/project_observer.rb, line 18
def log_info message
  Gitlab::AppLogger.info message
end