class CardLogoFile < ApplicationRecord
  has_many :employer_card_logos, dependent: :destroy
  has_many :employers, through: :employer_card_logos

  before_save :round_aspect_ratio

  private

  def round_aspect_ratio
    if self.aspect_ratio.present?
      self.aspect_ratio = self.aspect_ratio.round(2)
    end
  end
end
