Class/Module Index [+]

Quicksearch

ActionView::Helpers::AssetTagHelper::StylesheetTagHelpers

Public Instance Methods

path_to_stylesheet(source) click to toggle source
Alias for: stylesheet_path
stylesheet_path(source) click to toggle source

Computes the path to a stylesheet asset in the public stylesheets directory. If the source filename has no extension, .css will be appended (except for explicit URIs). Full paths from the document root will be passed through. Used internally by stylesheet_link_tag to build the stylesheet path.

Examples

stylesheet_path "style"                                  # => /stylesheets/style.css
stylesheet_path "dir/style.css"                          # => /stylesheets/dir/style.css
stylesheet_path "/dir/style.css"                         # => /dir/style.css
stylesheet_path "http://www.example.com/css/style"       # => http://www.example.com/css/style
stylesheet_path "http://www.example.com/css/style.css"   # => http://www.example.com/css/style.css
# File lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb, line 63
def stylesheet_path(source)
  asset_paths.compute_public_path(source, 'stylesheets', :ext => 'css', :protocol => :request)
end
Also aliased as: path_to_stylesheet

[Validate]

Generated with the Darkfish Rdoc Generator 2.