<commit_before>module CustomPathHelper
  def post_path(post, options = {})
    options.merge!(anchor:post.presenter.dom_id) if post.pos != 1
    topic_path(post.topic, options)
  end

  def post_url(post, options = {})
    options.merge!(anchor:post.presenter.dom_id) if post.pos != 1
    topic_utl(post.topic, options)
  end
end

Rails.application.routes.url_helpers.send(:include, CustomPathHelper)<commit_msg>Fix custom named route helper across Rails updates<commit_after>module CustomPathHelper
  def post_path(post, options = {})
    options.merge!(anchor:post.presenter.dom_id) if post.pos != 1
    topic_path(post.topic, options)
  end

  def post_url(post, options = {})
    options.merge!(anchor:post.presenter.dom_id) if post.pos != 1
    topic_utl(post.topic, options)
  end
end

Rails.application.routes.named_routes.url_helpers_module.send(:include, CustomPathHelper)
{'fraction_non_alphanumeric': 0.11691259931895573, 'fraction_numerical': 0.004540295119182747, 'mean_word_length': 4.919463087248322, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6707287', 'n_tokens_mistral': 293, 'n_tokens_neox': 293, 'n_words': 56}