Module: ActionView::Helpers::AssetTagHelper
- Defined in:
- lib/emcee/helpers/asset_tag_helper.rb
Instance Method Summary collapse
-
#html_import_tag(*sources) ⇒ Object
Custom view helper used to create an html import.
Instance Method Details
#html_import_tag(*sources) ⇒ Object
Custom view helper used to create an html import. Will search the asset directories for the sources.
html_import_tag("navigation")
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/emcee/helpers/asset_tag_helper.rb', line 9 def html_import_tag(*sources) = sources..stringify_keys = .extract!('protocol').symbolize_keys sources.uniq.map { |source| = { "rel" => "import", "href" => path_to_html(source, ) }.merge!() tag(:link, ) }.join("\n").html_safe end |