integrallis / stripe_event

Stripe webhook integration for Rails applications.
https://rubygems.org/gems/stripe_event
MIT License
844 stars 104 forks source link

Moving all stripe handling to a model #88

Closed noctivityinc closed 7 years ago

noctivityinc commented 7 years ago

I understand the initializer thing, but I want to be able to work on this code without having to restart the server every time I make a change. How can I move all the stripe handling code to either an app/stripe folder or an app/model/stripe folder so it autoreloads changes?

noctivityinc commented 7 years ago

I solved this with the configure hook:

StripeEvent.configure do |events|
  events.subscribe 'customer.source.created', CustomerSourceCreated.new
end