From 776ab73a8d159c02c7d72d6d5b4201480808cf02 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Wed, 21 Feb 2018 21:22:56 +0530 Subject: [PATCH] FIX: can_tag method called without guardian variable --- lib/discourse_tagging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/discourse_tagging.rb b/lib/discourse_tagging.rb index e30457035af..f9284f9751c 100644 --- a/lib/discourse_tagging.rb +++ b/lib/discourse_tagging.rb @@ -4,7 +4,7 @@ module DiscourseTagging TAGS_FILTER_REGEXP = /[\/\?#\[\]@!\$&'\(\)\*\+,;=\.%\\`^\s|\{\}"<>]+/ # /?#[]@!$&'()*+,;=.%\`^|{}"<> def self.tag_topic_by_names(topic, guardian, tag_names_arg, append: false) - if can_tag?(topic) + if guardian.can_tag?(topic) tag_names = DiscourseTagging.tags_for_saving(tag_names_arg, guardian) || [] old_tag_names = topic.tags.pluck(:name) || []