<commit_before>class UserDecorator < Draper::Decorator
  delegate_all

  def popover_preview
    h.render partial: "admin/users/popover_preview", object: self
  end

  def admin_link_with_popover(chapter=nil)
    common_opts = { data: { toggle: "popover", content: h.html_escape_once(popover_preview) }, title: name, class: "popoverable" }
    if chapter
      h.link_to name, h.admin_chapter_user_path(chapter, object), data: common_opts
    else
      h.link_to name, h.admin_user_path(object), common_opts
    end
  end

  def name
    if object.name.blank?
      object.email
    else
      object.name
    end
  end<commit_msg>Fix typo that stopped admin info popovers working on chapter/event pages in the eadmin interface.<commit_after>class UserDecorator < Draper::Decorator
  delegate_all

  def popover_preview
    h.render partial: "admin/users/popover_preview", object: self
  end

  def admin_link_with_popover(chapter=nil)
    common_opts = { data: { toggle: "popover", content: h.html_escape_once(popover_preview) }, title: name, class: "popoverable" }
    if chapter
      h.link_to name, h.admin_chapter_user_path(chapter, object), common_opts
    else
      h.link_to name, h.admin_user_path(object), common_opts
    end
  end

  def name
    if object.name.blank?
      object.email
    else
      object.name
    end
  end
{'fraction_non_alphanumeric': 0.08420268256333831, 'fraction_numerical': 0.0, 'mean_word_length': 3.5993150684931505, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1860314', 'n_tokens_mistral': 453, 'n_tokens_neox': 437, 'n_words': 108}