Module: Bulletin::Fingerprint
- Defined in:
- lib/bulletin/fingerprint.rb
Overview
The identity of an “issue”. Deliberately built from stable facts only: the kind of problem, the model, the association(s), and the controller#action that triggered it. File/line is intentionally excluded so a refactor doesn’t spawn duplicate issues — that detail lives on each occurrence instead.
Class Method Summary collapse
Class Method Details
.for(kind:, base_class:, associations:, controller:, action:) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/bulletin/fingerprint.rb', line 14 def for(kind:, base_class:, associations:, controller:, action:) raw = [ kind, base_class, Array(associations).map(&:to_s).sort.join(","), controller, action ].map(&:to_s).join("|") Digest::SHA256.hexdigest(raw) end |