class Build < ActiveRecord::Base
  belongs_to :repo
  has_many :violations, dependent: :destroy

  before_create :generate_uuid

  validates :repo, presence: true

  serialize :violations_archive, Array

  def status
    if violations.any?
      'failed'
    else
      'passed'
    end
  end

  private

  def generate_uuid
    self.uuid = SecureRandom.uuid
  end
end

class Build < ActiveRecord::Base
  belongs_to :repo
  has_many :violations, dependent: :destroy

  before_create :generate_uuid

  validates :repo, presence: true

  def status
    if violations.any?
      'failed'
    else
      'passed'
    end
  end

  private

  def generate_uuid
    self.uuid = SecureRandom.uuid
  end
end

Remove serialization of violations_archive on Build
Remove serialization of violations_archive on Build

Follow up to https://github.com/thoughtbot/hound/pull/493. We have no need to
serialize this data.
