joshmn / caffeinate

A Rails engine for drip campaigns/scheduled sequences and periodical support. Works with ActionMailer, and other things.

Home Page:https://caffeinate.email

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails 7.2: DEPRECATION WARNING: Caffeinate::CampaignSubscription model aliases `caffeinate_campaign`, but `caffeinate_campaign` is not an attribute.

maxwell opened this issue · comments

Starting in Rails 7.2, alias_attribute with non-attribute targets will raise. Use alias_method :campaign, :caffeinate_campaign or define the method manually.

backtrace sources this error from the following lines

  /Users/maxwell/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/caffeinate-2.5.0/app/models/caffeinate/campaign.rb:86:in `subscribe!'
  /Users/maxwell/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/caffeinate-2.5.0/lib/caffeinate/dripper/subscriber.rb:27:in `subscribe'