Skip to content

Instantly share code, notes, and snippets.

@braidn
Created January 9, 2017 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braidn/c4ee9bfd7e7cb3fe8cb8d336c62a30c6 to your computer and use it in GitHub Desktop.
Save braidn/c4ee9bfd7e7cb3fe8cb8d336c62a30c6 to your computer and use it in GitHub Desktop.
class SubscriptionMailerPreview < ActionMailer::Preview
def renewal_fail
order = Spree::Order.last
subscription = Spree::Order.last.subscription
raise 'An order and subscription is required in the DB' unless order && subscription
::SubscriptionMailer.renewal_fail(order, subscription)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment