def set_tags_context
      return unless tag_list_changed? || status_changed? || !persisted?

      # Give all tags current context
      set_tag_list_on(tag_context, tag_list)

      # Clear previous contexts
      self.tag_list = []
      inactive_tag_contexts.each do |context|
        set_tag_list_on(context, [])
      end
    end
def set_tags_context
      return unless tag_list_changed? || status_changed? || !persisted?

      # Give all tags current context
      set_tag_list_on(tag_context, tag_list)

      # Clear previous contexts
      self.tag_list = []
      inactive_tag_contexts.each do |context|
        set_tag_list_on(context, [])
      end
    end
Set the context of tags so that draft and archived tags are not displayed publicly