Repository navigation
1.0.0.beta2
Pre-release
Pre-release
Second beta on the road to 1.0. Drop-in upgrade from 1.0.0.beta1: no migrations, no breaking API changes — and if you worked around the ClassifyJob bug below, you can now delete the workaround.
Fixed
- Async adapters now actually run in
Moderate::ClassifyJob(#3). beta1's:flagafter_commit calledModerate.classifyinline for every adapter — including ones declaringsynchronous? == false— so a remote moderation API ran its network call inside the request that saved the content, andClassifyJob(whose docs promised this routing) was never enqueued by anything. The concern now checksconfig.adapter_async?(policy.adapter)(new public helper) and enqueues the job; the job re-reads the persisted value and files the Flag itself. Hosts that enqueuedClassifyJobthemselves and short-circuitedmoderation_field_changed_for_commit?can delete both workarounds.
Added
- Active Storage attachments filter out of the box (#3).
moderates :avatar, with: :your_image_adapter, mode: :flagon ahas_one_attachedmodel needs zero extra wiring: the concern snapshotsattachment_changesin abefore_save(AR dirty tracking can't see attachment writes, and Active Storage clears the changes before after_commit), consumes the snapshot at commit time, and both the concern andClassifyJobtreat an unattachedActiveStorage::Attachedproxy as blank — covering purge-between-enqueue-and-run. The threemoderation_field_*seam overrides remain for richer cases. Flag#action!(note:, by: nil)/Flag#dismiss!(note:, by: nil)(#4) — model-level closes mirroringReport#resolve!/#dismiss!.by:staysnilfor automated closes (don't fake a human reviewer in the audit trail — DSA statements of reasons read these rows). Canonical automated use: dismiss a pending flag whose flagged content was superseded (text edited, photo replaced/reverted) — left pending it keepsflagged?true and mislabels the NEW content in any host UI keyed on it.
Full test suite: 208 runs, 0 failures. Battle-tested against a production host (CarHey) running an async Claude-vision avatar adapter end-to-end.
Full changelog: v1.0.0.beta1...v1.0.0.beta2