<commit_before>class Ckeditor::Asset < ActiveRecord::Base
  include Ckeditor::Orm::ActiveRecord::AssetBase

  delegate :url, :current_path, :content_type, to: :data

  validates_presence_of :data

  validates :data,
      presence: true
      # file_size: {
      #   maximum: 5.megabytes.to_i
      }

  validate :image_size_validation, :if => "data?"
  def image_size_validation
    errors.add(:data, "should be less than 5M") if data.size > 5.0.megabytes.to_i
  end


  before_save :set_unit_id

  def set_unit_id
    # self.unit_id = assetable.try(:unit_id)
    self.unit_id = Unit.first.id
  end

end
<commit_msg>fix syntax error<commit_after>class Ckeditor::Asset < ActiveRecord::Base
  include Ckeditor::Orm::ActiveRecord::AssetBase

  delegate :url, :current_path, :content_type, to: :data

  validates_presence_of :data

  validates :data,
      presence: true
      # file_size: {
      #   maximum: 5.megabytes.to_i
      # }

  validate :image_size_validation, :if => "data?"
  def image_size_validation
    errors.add(:data, "should be less than 5M") if data.size > 5.0.megabytes.to_i
  end


  before_save :set_unit_id

  def set_unit_id
    # self.unit_id = assetable.try(:unit_id)
    self.unit_id = Unit.first.id
  end

end

{'fraction_non_alphanumeric': 0.10717163577759871, 'fraction_numerical': 0.0064464141821112, 'mean_word_length': 3.5661764705882355, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7292052', 'n_tokens_mistral': 466, 'n_tokens_neox': 443, 'n_words': 94}