Module: Avo::Icons::Helpers
- Defined in:
- lib/avo/icons/helpers.rb
Instance Method Summary collapse
-
#svg(file_name, **args) ⇒ String
Use inline_svg gem but with our own finder implementation.
Instance Method Details
#svg(file_name, **args) ⇒ String
Use inline_svg gem but with our own finder implementation.
11 12 13 14 15 16 17 18 19 |
# File 'lib/avo/icons/helpers.rb', line 11 def svg(file_name, **args) return if file_name.blank? file_name = "#{file_name}.svg" unless file_name.end_with? ".svg" with_asset_finder(Avo::Icons::SvgFinder) do inline_svg file_name, **args end end |