2025-12-10 13:22:33 -05:00
|
|
|
class CardLogoFile < ApplicationRecord
|
2026-01-15 11:37:50 -05:00
|
|
|
has_many :employer_card_logos, dependent: :destroy
|
|
|
|
|
has_many :employers, through: :employer_card_logos
|
2026-03-03 22:53:21 -05:00
|
|
|
|
|
|
|
|
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
|
2025-12-10 13:22:33 -05:00
|
|
|
end
|