RailsCasts Pro episodes are now free!

Learn more or hide this

kmeehl's Profile

GitHub User: kmeehl

Comments by

Avatar

Thanks.

A couple of questions about your implementation of save_with_subscription:

1) you use save! in your implementation. Would it be better to either return the result of save, or change the name of the function to save_with_subscription!, in order to better follow conventions?

2) I noticed that you don't handle failures to save. In the real world, we would need to handle that failure by manually rolling back the subscription creation. Or is there a better way to handle this with Stripe?