Method: Binda::FieldableAssociationHelpers::FieldableImageHelpers#get_image_size
- Defined in:
- app/models/concerns/binda/fieldable_association_helpers/fieldable_image_helpers.rb
#get_image_size(field_slug) ⇒ float
Get image size
62 63 64 65 |
# File 'app/models/concerns/binda/fieldable_association_helpers/fieldable_image_helpers.rb', line 62 def get_image_size(field_slug) obj = self.images.find{ |t| t.field_setting_id == FieldSetting.get_id( field_slug ) } return bytes_to_megabytes(obj.file_size) end |