Module: Munge::Helpers::AssetTags
- Defined in:
- lib/munge/helpers/asset_tags.rb
Instance Method Summary collapse
- #inline_javascript_tag(basename, options = {}) ⇒ Object
- #inline_stylesheet_tag(basename, options = {}) ⇒ Object
- #javascript_tag(basename, options = {}) ⇒ Object
- #stylesheet_tag(basename, options = {}) ⇒ Object
Instance Method Details
#inline_javascript_tag(basename, options = {}) ⇒ Object
22 23 24 |
# File 'lib/munge/helpers/asset_tags.rb', line 22 def inline_javascript_tag(basename, = {}) inline_asset_tag_helper(javascripts_root, basename, :script, ) end |
#inline_stylesheet_tag(basename, options = {}) ⇒ Object
18 19 20 |
# File 'lib/munge/helpers/asset_tags.rb', line 18 def inline_stylesheet_tag(basename, = {}) inline_asset_tag_helper(stylesheets_root, basename, :style, ) end |
#javascript_tag(basename, options = {}) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/munge/helpers/asset_tags.rb', line 11 def javascript_tag(basename, = {}) [:type] = "text/javascript" [:src] = javascript_url(basename) content_tag(:script, ) end |
#stylesheet_tag(basename, options = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/munge/helpers/asset_tags.rb', line 4 def stylesheet_tag(basename, = {}) [:rel] = "stylesheet" [:href] = stylesheet_url(basename) empty_tag(:link, ) end |