<commit_before>class Stock < ActiveRecord::Base
  belongs_to :watchlist

end<commit_msg>add validation to pass test for stock<commit_after>class Stock < ActiveRecord::Base
  belongs_to :watchlist
  before_save :upcase_symbol

  validates :symbol, presence: true
  validates :company_name, presence: true
  validates :watchlist_id, presence: true

  private
    def upcase_symbol
      self.symbol = symbol.upcase
    end
end
{'fraction_non_alphanumeric': 0.06367924528301887, 'fraction_numerical': 0.0, 'mean_word_length': 4.821917808219178, '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': '6675286', 'n_tokens_mistral': 128, 'n_tokens_neox': 127, 'n_words': 37}