Method: Binda::FieldableAssociationHelpers::FieldableSvgHelpers#get_svg_mime_type

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

#get_svg_mime_type(field_slug) ⇒ string

Get svg type

Parameters:

  • field_slug (string)

    The slug of the field setting

Returns:

  • (string)

    with svg type



59
60
61
62
# File 'app/models/concerns/binda/fieldable_association_helpers/fieldable_svg_helpers.rb', line 59

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