Module: UpdateNamespaceStatistics

Extended by:
ActiveSupport::Concern
Includes:
AfterCommitQueue
Included in:
DependencyProxy::Blob, DependencyProxy::Manifest
Defined in:
app/models/concerns/update_namespace_statistics.rb

Overview

This module provides helpers for updating `NamespaceStatistics` with `after_save` and `after_destroy` hooks.

Models including this module must respond to and return a `namespace`

Example:

class DependencyProxy::Manifest

include UpdateNamespaceStatistics

belongs_to :group
alias_attribute :namespace, :group

update_namespace_statistics namespace_statistics_name: :dependency_proxy_size

end

Method Summary

Methods included from AfterCommitQueue

#run_after_commit, #run_after_commit_or_now