joshmn / caffeinate

A Rails engine for drip campaigns/scheduled sequences and periodical support. Works with ActionMailer, and other things.
https://caffeinate.email
MIT License
345 stars 13 forks source link

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

Open maxwell opened 11 months ago

maxwell commented 11 months ago

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'