<commit_before>class GiftCard < ActiveRecord::Base

  monetize :amount_cents

  enum reason: {
    unknown: 0,
    signup: 1,
    test: 2,
    referral: 3,
    interview: 4,
    other: 5
  }

  belongs_to :giftable, polymorphic: true, touch: true
  validates_presence_of :amount
  validates_presence_of :reason

end<commit_msg>validate last four length<commit_after>class GiftCard < ActiveRecord::Base

  monetize :amount_cents

  enum reason: {
    unknown: 0,
    signup: 1,
    test: 2,
    referral: 3,
    interview: 4,
    other: 5
  }

  belongs_to :giftable, polymorphic: true, touch: true
  validates_presence_of :amount
  validates_presence_of :reason
  validates :last_four, length: { is: 4 }

end
{'fraction_non_alphanumeric': 0.08757062146892655, 'fraction_numerical': 0.018361581920903956, 'mean_word_length': 3.515923566878981, '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': '3271162', 'n_tokens_mistral': 275, 'n_tokens_neox': 249, 'n_words': 67}