14 lines
250 B
Ruby
14 lines
250 B
Ruby
module IdCard
|
|
class NetworkLogo < ApplicationRecord
|
|
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
|
|
end
|