Class: Decidim::Plans::Tracer
- Inherits:
-
Object
- Object
- Decidim::Plans::Tracer
- Defined in:
- app/services/decidim/plans/tracer.rb
Overview
The Tracer class allows performing PaperTrail requests where all records saved during the yield will be stored against the same transaction ID. This allows saving the main record and its associated records so that the same changeset can be easily identified afterwards.
Instance Method Summary collapse
Instance Method Details
#trace!(author) ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/services/decidim/plans/tracer.rb', line 10 def trace!() return unless block_given? ::PaperTrail.request(whodunnit: gid()) do yield end end |