From 313e48fa68b826dc843e866e9358e1951aecfb92 Mon Sep 17 00:00:00 2001 From: Raffi Sarkissian Date: Thu, 2 Jan 2025 10:37:07 -0500 Subject: [PATCH] add subscription version command in self hosted useful commands --- guide/self-hosted/commands.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/guide/self-hosted/commands.mdx b/guide/self-hosted/commands.mdx index 31c024ca..f3349b77 100644 --- a/guide/self-hosted/commands.mdx +++ b/guide/self-hosted/commands.mdx @@ -48,3 +48,12 @@ To remove the cache for all subscriptions, you can alternatively use this comman # In the rails Console Subscription.find_each {|s| Subscriptions::ChargeCacheService.expire_for_subscription(s) } ``` + +## Audit logs of a subscription +Use this to view all changes applied to a subscription and identify which membership made those changes. + +```ruby +# In the rails Console +subscription = Subscription.find_by(external_id: 'YOUR_SUB_EXTERNAL_ID') +subscription.versions +``` \ No newline at end of file