Module: Caffeinate::Helpers
- Included in:
- UrlHelpers
- Defined in:
- lib/caffeinate/helpers.rb
Overview
URL helpers for accessing the mounted Caffeinate instance.
Instance Method Summary collapse
- #caffeinate_subscribe_path(subscription, **options) ⇒ Object
- #caffeinate_subscribe_url(subscription, **options) ⇒ Object
- #caffeinate_unsubscribe_path(subscription, **options) ⇒ Object
- #caffeinate_unsubscribe_url(subscription, **options) ⇒ Object
Instance Method Details
#caffeinate_subscribe_path(subscription, **options) ⇒ Object
20 21 22 |
# File 'lib/caffeinate/helpers.rb', line 20 def caffeinate_subscribe_path(subscription, **) Caffeinate::Engine.routes.url_helpers.subscribe_campaign_subscription_path(token: subscription.token, **) end |
#caffeinate_subscribe_url(subscription, **options) ⇒ Object
11 12 13 14 |
# File 'lib/caffeinate/helpers.rb', line 11 def caffeinate_subscribe_url(subscription, **) opts = (::ActionMailer::Base. || {}).merge() Caffeinate::Engine.routes.url_helpers.subscribe_campaign_subscription_url(token: subscription.token, **opts) end |
#caffeinate_unsubscribe_path(subscription, **options) ⇒ Object
16 17 18 |
# File 'lib/caffeinate/helpers.rb', line 16 def caffeinate_unsubscribe_path(subscription, **) Caffeinate::Engine.routes.url_helpers.unsubscribe_campaign_subscription_path(token: subscription.token, **) end |
#caffeinate_unsubscribe_url(subscription, **options) ⇒ Object
6 7 8 9 |
# File 'lib/caffeinate/helpers.rb', line 6 def caffeinate_unsubscribe_url(subscription, **) opts = (::ActionMailer::Base. || {}).merge() Caffeinate::Engine.routes.url_helpers.unsubscribe_campaign_subscription_url(token: subscription.token, **opts) end |