Halfway through table redesign, saving to revert to working version

This commit is contained in:
Jason Jordan
2026-03-05 11:30:24 -05:00
parent ea07afb751
commit b5a1517330
86 changed files with 1286 additions and 884 deletions
+14
View File
@@ -0,0 +1,14 @@
class IdCard::EmployerLogo < ApplicationRecord
before_save :calculate_aspect_ratio, if: :image_data_changed?
private
def calculate_aspect_ratio
image_io = StringIO.new(self.image_data)
width, height = FastImage.size(image_io)
image_ratio = width.to_f / height
if image_ratio
self.aspect_ratio = image_ratio.round(2)
end
end
end