From ac585c8c1c4eb3685ed49b5a2aab6ebfb4208ff8 Mon Sep 17 00:00:00 2001 From: Teri Solow Date: Tue, 14 Nov 2017 17:29:51 -0800 Subject: [PATCH] matches_attribute was not being used in tag_match_type; addresses https://github.com/mbleigh/acts-as-taggable-on/issues/869 --- .../taggable/tagged_with_query/query_base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/acts_as_taggable_on/taggable/tagged_with_query/query_base.rb b/lib/acts_as_taggable_on/taggable/tagged_with_query/query_base.rb index 011ae51e8..56481e74e 100644 --- a/lib/acts_as_taggable_on/taggable/tagged_with_query/query_base.rb +++ b/lib/acts_as_taggable_on/taggable/tagged_with_query/query_base.rb @@ -29,9 +29,9 @@ def tag_match_type(tag) matches_attribute = matches_attribute.lower unless ActsAsTaggableOn.strict_case_match if options[:wild].present? - tag_arel_table[:name].matches("%#{escaped_tag(tag)}%", "!") + matches_attribute.matches("%#{escaped_tag(tag)}%", "!") else - tag_arel_table[:name].matches(escaped_tag(tag), "!") + matches_attribute.matches(escaped_tag(tag), "!") end end