Module: Munge::Helpers::AssetTags

Defined in:
lib/munge/helpers/asset_tags.rb

Instance Method Summary collapse

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, options = {})
  inline_asset_tag_helper(javascripts_root, basename, :script, options)
end

#inline_stylesheet_tag(basename, options = {}) ⇒ Object



18
19
20
# File 'lib/munge/helpers/asset_tags.rb', line 18

def inline_stylesheet_tag(basename, options = {})
  inline_asset_tag_helper(stylesheets_root, basename, :style, options)
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, options = {})
  options[:type] = "text/javascript"
  options[:src]  = javascript_url(basename)

  (:script, options)
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, options = {})
  options[:rel]  = "stylesheet"
  options[:href] = stylesheet_url(basename)

  empty_tag(:link, options)
end