<commit_before>class Ban < ActiveRecord::Base
  belongs_to :member
  belongs_to :added_by, class_name: 'Member'

  validates :reason, :note, :added_by, presence: true

  validate :valid_expiry_date?

  scope :active, -> { where('expires_at > ?', Date.current) }
  scope :permanent, -> { where(permanent: true) }

  def active?
    expires_at.future?
  end

  def expiry_in_words
    'There is a permanent ban on the user' if permanent
    expires_at
  end

  private

  def valid_expiry_date?
    errors.add(:expires_at, 'must be in the future') unless expires_at.try(:future?)
  end
end<commit_msg>Removes unused expiry_in_words method from ban.rb<commit_after>class Ban < ActiveRecord::Base
  belongs_to :member
  belongs_to :added_by, class_name: 'Member'

  validates :reason, :note, :added_by, presence: true

  validate :valid_expiry_date?

  scope :active, -> { where('expires_at > ?', Date.current) }
  scope :permanent, -> { where(permanent: true) }

  def active?
    expires_at.future?
  end

  private

  def valid_expiry_date?
    errors.add(:expires_at, 'must be in the future') unless expires_at.try(:future?)
  end
end
{'fraction_non_alphanumeric': 0.10846560846560846, 'fraction_numerical': 0.0, 'mean_word_length': 4.206422018348624, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6565673', 'n_tokens_mistral': 409, 'n_tokens_neox': 391, 'n_words': 102}