-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Description
include Stripe::Callbacks
after_stripe_event! do |target, event|
Billing::Event.create!(stripe_id: event.id, kind: event.type, data: event.to_hash)
endThe code above works well after the app restart. Once I modify the code the app gets reloaded and the callback is never called again.
Can reproduce from rails console
3.1.1 :002 > ::Stripe::Callbacks::critical_callbacks
=> {"stripe.event"=>[#<Proc:0x00000001163479b8 /Users/heaven/Workspace/mdc/app/models/member.rb:30>]}
3.1.1 :003 > reload!
Reloading...
=> true
3.1.1 :004 > ::Stripe::Callbacks::critical_callbacks
=> {}
To reproduce the problem config.eager_load should be true in development.
Rails: 7.0.2
Rails env: development
Stripe: 6.5.0 (same with 6.1.0)
Stripe Rails: 2.3.4
Metadata
Metadata
Assignees
Labels
No labels