Skip to content

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

@maxwell

Description

@maxwell

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions