mbleigh / acts-as-taggable-on

A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.
http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on
MIT License
4.95k stars 1.18k forks source link

Issue on Rails 7.1 upgrade #1112

Closed ajdubovoy closed 8 months ago

ajdubovoy commented 9 months ago

I just upgraded a project to Rails 7.1. It seems to actually run fine in the server, but I've started getting some red Rspec tests that seem to be related to this gem:

warning: already initialized constant ActsAsTaggableOn::Tagging::DEFAULT_CONTEXT
Failure/Error: let(:invitation) { create(:invitation, user:) }

     NoMethodError:
       undefined method `arity' for {:polymorphic=>true}:Hash

             if scope && scope.arity == 0

I get this same error on each test.

Thanks for your help!

jon-sully commented 8 months ago

I just ran into this as well. Everything actually works fine when running directly on master, and I think prior to, some dependency issues forced us to be running on a fairly old version (5.x.x?) to begin with. I think master is good for Rails 7.1.

seuros commented 8 months ago

Can you try https://github.com/mbleigh/acts-as-taggable-on/pull/1114 please.

jon-sully commented 8 months ago

Sure! Let me run it against our suite.

jon-sully commented 8 months ago

Yep, both master and v10 pre-release worked fine for me 👍

seuros commented 8 months ago

I will merge it and release it tomorrow then.

jon-sully commented 8 months ago

Sweet! 😎

h0jeZvgoxFepBQ2C commented 8 months ago

Great, waiting for the release.. Thank you so much!

ajdubovoy commented 8 months ago

Thank you so much for your help!!

seuros commented 8 months ago

Released