tansengming / stripe-rails

A Rails Engine for integrating with Stripe
MIT License
753 stars 123 forks source link

Handle passing nil to signing_secret= and add tests #195

Closed martron closed 3 years ago

martron commented 3 years ago

Addresses the issue "undefined method `data' for []:Array #178" by making sure signing_secrets is set to nil if signing_secret=(nil) is called instead of Array(nil) which returns an empty array.

martron commented 3 years ago

Note that I didn't use a guard clause because signing_secret = nil should still be able to set it to nil if it was previously set to something else.

tansengming commented 3 years ago

Looks good to me, thanks for the PR!