<commit_before>class Participation < ActiveRecord::Base
  belongs_to :user
  belongs_to :challenge
end<commit_msg>Update schema with paperclip<commit_after>class Participation < ActiveRecord::Base
  belongs_to :user
  belongs_to :challenge

  has_attached_file :image, :styles => {:medium => "200x200", :large => "500x500"}
  validates_attachment :image, :content_type => {:content_type => /^image\/(jpeg|png|gif|tiff)$/}

  def as_json(options={})
    super(options).merge(image_url: image.url)
  end
end
{'fraction_non_alphanumeric': 0.13267326732673268, 'fraction_numerical': 0.023762376237623763, 'mean_word_length': 6.228571428571429, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '1653653', 'n_tokens_mistral': 180, 'n_tokens_neox': 166, 'n_words': 35}