Method: Binda::FieldableAssociationHelpers::FieldableImageHelpers#get_image_mime_type

Defined in:
app/models/concerns/binda/fieldable_association_helpers/fieldable_image_helpers.rb

#get_image_mime_type(field_slug) ⇒ string

Get image type

Parameters:

  • field_slug (string)

    The slug of the field setting

Returns:

  • (string)

    with image type



71
72
73
74
# File 'app/models/concerns/binda/fieldable_association_helpers/fieldable_image_helpers.rb', line 71

def get_image_mime_type(field_slug)
	obj = self.images.find{ |t| t.field_setting_id == FieldSetting.get_id( field_slug ) }
   	return obj.content_type
end