<commit_before>module ApplicationHelper

  def current_database 
    ActiveRecord::Base.connection().current_database
  end

end
<commit_msg>sqlite fix for current_database method<commit_after>module ApplicationHelper

  def current_database 
    begin
      ActiveRecord::Base.connection().current_database
    rescue
      # Sqlite/possibly other adapters may not implement the current_database method
      ActiveRecord::Base.configurations[RAILS_ENV]["database"]
    end
  end

end

{'fraction_non_alphanumeric': 0.059670781893004114, 'fraction_numerical': 0.0, 'mean_word_length': 4.597701149425287, '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': '4019462', 'n_tokens_mistral': 132, 'n_tokens_neox': 126, 'n_words': 31}