Module: Cyborg::Helpers::AssetsHelper
- Defined in:
- lib/cyborg/helpers/asset_helpers.rb
Instance Method Summary collapse
- #asset_tags ⇒ Object
- #javascript_tag(*args) ⇒ Object
- #javascript_url(*args) ⇒ Object
- #pin_tab_icon(path) ⇒ Object
- #stylesheet_tag(*args) ⇒ Object
- #stylesheet_url(*args) ⇒ Object
Instance Method Details
#asset_tags ⇒ Object
36 37 38 |
# File 'lib/cyborg/helpers/asset_helpers.rb', line 36 def stylesheet_tag + javascript_tag end |
#javascript_tag(*args) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cyborg/helpers/asset_helpers.rb', line 16 def javascript_tag(*args) = args.last.is_a?(Hash) ? args.pop : {} = '' puts "searching for: #{javascript_url(args)}" javascript_url(args).each do |url| += javascript_include_tag(url, ) end .html_safe end |
#javascript_url(*args) ⇒ Object
32 33 34 |
# File 'lib/cyborg/helpers/asset_helpers.rb', line 32 def javascript_url(*args) Cyborg.plugin.javascripts.urls(args) end |
#pin_tab_icon(path) ⇒ Object
40 41 42 |
# File 'lib/cyborg/helpers/asset_helpers.rb', line 40 def pin_tab_icon(path) %Q{<link rel="mask-icon" mask href="#{path}" color="black">}.html_safe end |
#stylesheet_tag(*args) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/cyborg/helpers/asset_helpers.rb', line 5 def stylesheet_tag(*args) = args.last.is_a?(Hash) ? args.pop : {} = '' stylesheet_url(args).each do |url| += stylesheet_link_tag(url, ) end .html_safe end |