<commit_before>module StaticErrorPages
  class InstallGenerator < Rails::Generators::Base
    def create_views
      StaticErrorPages.supported_errors.each do |code|
        path = "app/views/static_error_pages/error/#{code}.html.erb"
        create_file path, "Find me in #{path}"
      end
    end
  end
end<commit_msg>Use default rails code in templates for now<commit_after>module StaticErrorPages
  class InstallGenerator < Rails::Generators::Base
    def create_views
      html = {
        '404' => "<h1>The page you were looking for doesn't exist.</h1>\n<p>You may have mistyped the address or the page may have moved.</p>",
        '422' => "<h1>The change you wanted was rejected.</h1>\n<p>Maybe you tried to change something you didn't have access to.</p>"
      }
      StaticErrorPages.supported_errors.each do |code|
        path = "app/views/static_error_pages/error/#{code}.html.erb"
        create_file path, html.fetch(code, "<h1>We're sorry, but something went wrong.</h1>")
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.11067580803134182, 'fraction_numerical': 0.011753183153770812, 'mean_word_length': 3.3122362869198314, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6267621', 'n_tokens_mistral': 318, 'n_tokens_neox': 304, 'n_words': 91}