<commit_before>class Issue < ActiveRecord::Base

  after_create :update_slug
  after_update :update_slug

  mount_uploader :cover_image, CoverImageUploader
  mount_uploader :pdf, AttachmentUploader

  has_many :posts
  accepts_nested_attributes_for :posts, allow_destroy: false

  def to_param
    slug
  end

  def self.search(search)
    if search
      where('lower(title) LIKE ?', "%#{search.downcase}%")<commit_msg>no such thing as after_update<commit_after>class Issue < ActiveRecord::Base

  before_create :update_slug
  before_save :update_slug

  mount_uploader :cover_image, CoverImageUploader
  mount_uploader :pdf, AttachmentUploader

  has_many :posts
  accepts_nested_attributes_for :posts, allow_destroy: false

  def to_param
    slug
  end

  def self.search(search)
    if search
      where('lower(title) LIKE ?', "%#{search.downcase}%")
{'fraction_non_alphanumeric': 0.08177570093457943, 'fraction_numerical': 0.0, 'mean_word_length': 4.910344827586207, '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': '2053194', 'n_tokens_mistral': 281, 'n_tokens_neox': 274, 'n_words': 63}