Class: ActionView::Helpers::AssetTagHelper::StylesheetIncludeTag

Inherits:
AssetIncludeTag
  • Object
show all
Defined in:
lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb

Constant Summary

Constants included from TagHelper

TagHelper::BOOLEAN_ATTRIBUTES, TagHelper::PRE_CONTENT_STRINGS

Instance Attribute Summary

Attributes inherited from AssetIncludeTag

#asset_paths, #config

Instance Method Summary collapse

Methods inherited from AssetIncludeTag

#include_tag, inherited, #initialize

Methods included from TagHelper

#cdata_section, #content_tag, #escape_once, #tag

Methods included from CaptureHelper

#capture, #content_for, #content_for?, #flush_output_buffer, #provide, #with_output_buffer

Constructor Details

This class inherits a constructor from ActionView::Helpers::AssetTagHelper::AssetIncludeTag

Instance Method Details

#asset_nameObject



10
11
12
# File 'lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb', line 10

def asset_name
  'stylesheet'
end

#asset_tag(source, options) ⇒ Object



18
19
20
21
# File 'lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb', line 18

def asset_tag(source, options)
  # We force the :request protocol here to avoid a double-download bug in IE7 and IE8
  tag("link", { "rel" => "stylesheet", "type" => Mime::CSS, "media" => "screen", "href" => path_to_asset(source, :protocol => :request) }.merge(options))
end

#custom_dirObject



23
24
25
# File 'lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb', line 23

def custom_dir
  config.stylesheets_dir
end

#extensionObject



14
15
16
# File 'lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb', line 14

def extension
  'css'
end