FIX: can_tag method called without guardian variable
This commit is contained in:
parent
d4b2e840cb
commit
776ab73a8d
|
@ -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) || []
|
||||
|
|
Loading…
Reference in New Issue