Module: ActionView::Helpers::AssetTagHelper
- Defined in:
- lib/html_import_tag/helpers/asset_tag_helper.rb
Instance Method Summary collapse
Instance Method Details
#html_import_tag(*sources) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/html_import_tag/helpers/asset_tag_helper.rb', line 4 def html_import_tag(*sources) = sources..stringify_keys = .extract!('protocol', 'extname').symbolize_keys sources.uniq.map do |source| = { rel: "import", href: path_to_asset(source, {:type => :html, extname: ".html"}.merge!()) }.merge!() tag(:link, ) end.join("\n").html_safe end |