You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the switch from ActsAsTaggableOn to Gutentag a new Taggable module was introduced. It overrides the tagged_with class method both libraries are offering. Both libraries allow to choose the tag matching mechanism when using this method. Currently, the module does not allow this at all but hard codes match: :allwhen delegating to the original method.
Describe the solution you'd like
I'd like to change the tagged_with interface, but keep it backwards compatible. The benefit is we can fully support the underlying interface gutentag has to offer.
The implementation looks like this
def tagged_with(names=[], **args)
if names.is_a? String
names = names.split(/,\s*/)
end
if names.any?
args.merge!(names: names)
end
super(args)
end
still supporting the current way of using it, without any behaviour change.
Alchemy::Attachment.tagged_with("foo, bar")
but allowing us to take advantage of other matchers than just all.
After the switch from ActsAsTaggableOn to Gutentag a new
Taggable
module was introduced. It overrides thetagged_with
class method both libraries are offering. Both libraries allow to choose the tag matching mechanism when using this method. Currently, the module does not allow this at all but hard codesmatch: :all
when delegating to the original method.Describe the solution you'd like
I'd like to change the
tagged_with
interface, but keep it backwards compatible. The benefit is we can fully support the underlying interface gutentag has to offer.The implementation looks like this
still supporting the current way of using it, without any behaviour change.
but allowing us to take advantage of other matchers than just
all
.But it also allows for more...
The text was updated successfully, but these errors were encountered: