module ActionView::Helpers::AssetUrlHelper

def stylesheet_path(source, options = {})

stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css
stylesheet_path "http://www.example.com/css/style" # => http://www.example.com/css/style
stylesheet_path "/dir/style.css" # => /dir/style.css
stylesheet_path "dir/style.css" # => /assets/dir/style.css
stylesheet_path "style" # => /assets/style.css

Used internally by +stylesheet_link_tag+ to build the stylesheet path.
Full paths from the document root will be passed through.
If the +source+ filename has no extension, .css will be appended (except for explicit URIs).
Computes the path to a stylesheet asset in the public stylesheets directory.
def stylesheet_path(source, options = {})
  path_to_asset(source, {type: :stylesheet}.merge!(options))
end