<commit_before>ActsAsTaggableOn::Tag.class_eval do
  has_many :customfields

  #~ sortable :by => [ "name ASC", "created_at DESC", "updated_at DESC" ], :default => "name ASC"

  SORT_BY = {
    "name"          => "tags.name ASC",
    "date created"  => "tags.created_at DESC",
    "date updated"  => "tags.updated_at DESC"
  }

  # Default values provided through class methods.
  #----------------------------------------------------------------------------
  def self.per_page ; 20              ; end
  def self.outline  ; "long"          ; end
  def self.sort_by  ; "tags.name ASC" ; end
end<commit_msg>Added :super_tags scope for ActsAsTaggableOn::Tag (returns tags with customfields)<commit_after>ActsAsTaggableOn::Tag.class_eval do
  has_many :customfields

  # Finds all tags with customfields
  scope :super_tags, joins(:customfields).having('count(customfields.id) > 0').group(:id)

  #~ sortable :by => [ "name ASC", "created_at DESC", "updated_at DESC" ], :default => "name ASC"

  SORT_BY = {
    "name"          => "tags.name ASC",
    "date created"  => "tags.created_at DESC",
    "date updated"  => "tags.updated_at DESC"
  }

  # Default values provided through class methods.
  #----------------------------------------------------------------------------
  def self.per_page ; 20              ; end
  def self.outline  ; "long"          ; end
  def self.sort_by  ; "tags.name ASC" ; end

end

{'fraction_non_alphanumeric': 0.22537207654145996, 'fraction_numerical': 0.003543586109142452, 'mean_word_length': 2.0300429184549356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, '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': '7188567', 'n_tokens_mistral': 456, 'n_tokens_neox': 433, 'n_words': 110}