Module: InlineSvg::ActionView::Helpers

Defined in:
lib/inline_svg/action_view/helpers.rb

Instance Method Summary collapse

Instance Method Details

#inline_svg(filename, transform_params = {}) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/inline_svg/action_view/helpers.rb', line 19

def inline_svg(filename, transform_params={})
  ActiveSupport::Deprecation.warn(
    '`inline_svg` is deprecated and will be removed from inline_svg 2.0 (use `inline_svg_tag` or `inline_svg_pack_tag` instead)'
  )

  render_inline_svg(filename, transform_params)
end

#inline_svg_pack_tag(filename, transform_params = {}) ⇒ Object



13
14
15
16
17
# File 'lib/inline_svg/action_view/helpers.rb', line 13

def inline_svg_pack_tag(filename, transform_params={})
  with_asset_finder(InlineSvg::WebpackAssetFinder) do
    render_inline_svg(filename, transform_params)
  end
end

#inline_svg_tag(filename, transform_params = {}) ⇒ Object



7
8
9
10
11
# File 'lib/inline_svg/action_view/helpers.rb', line 7

def inline_svg_tag(filename, transform_params={})
  with_asset_finder(InlineSvg.configuration.asset_finder) do
    render_inline_svg(filename, transform_params)
  end
end