Module: ActionView::Helpers::AssetTagHelper
- Defined in:
- lib/emcee/helpers/action_view.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")
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/emcee/helpers/action_view.rb', line 20 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 |