Module: Sprockets::SassFunctions

Defined in:
lib/sass/rails/helpers.rb

Instance Method Summary collapse

Instance Method Details

#asset_data_url(path) ⇒ Object



26
27
28
# File 'lib/sass/rails/helpers.rb', line 26

def asset_data_url(path)
  Sass::Script::String.new("url(" + sprockets_context.asset_data_uri(path.value) + ")")
end

#asset_path(path, kind = nil) ⇒ Object



10
11
12
13
14
# File 'lib/sass/rails/helpers.rb', line 10

def asset_path(path, kind = nil)
  ActiveSupport::Deprecation.warn "asset_path with two arguments is deprecated. Use asset_path(#{path}) instead." if kind

  Sass::Script::String.new(sprockets_context.asset_path(path.value), :string)
end

#asset_url(path, kind = nil) ⇒ Object



20
21
22
23
24
# File 'lib/sass/rails/helpers.rb', line 20

def asset_url(path, kind = nil)
  ActiveSupport::Deprecation.warn "asset_url with two arguments is deprecated. Use asset_url(#{path}) instead." if kind

  Sass::Script::String.new("url(" + sprockets_context.asset_path(path.value) + ")")
end