Halfway through table redesign, saving to revert to working version
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user