<commit_before>class Micropost < ApplicationRecord
  belongs_to :user

  default_scope -> { order(created_at: :desc) }

  mount_uploader :picture, PictureUploader

  validates :user_id, presence: true
  validates :content, presence: true, length: { maximum: 140 }
  validate :picture_size

  private

  def picture_size
    erros.add(:picture, 'should be less than 5MB') if picture.size > 5.megabytes
  end
end<commit_msg>Fix bug not to add error<commit_after>class Micropost < ApplicationRecord
  belongs_to :user

  default_scope -> { order(created_at: :desc) }

  mount_uploader :picture, PictureUploader

  validates :user_id, presence: true
  validates :content, presence: true, length: { maximum: 140 }
  validate :picture_size

  private

  def picture_size
    errors.add(:picture, 'should be less than 5MB') if picture.size >
                                                       5.megabytes
  end
end
{'fraction_non_alphanumeric': 0.08122941822173436, 'fraction_numerical': 0.010976948408342482, 'mean_word_length': 3.322274881516588, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1322458', 'n_tokens_mistral': 286, 'n_tokens_neox': 265, 'n_words': 80}