class Sprockets::Helpers::Settings
Attributes
asset_host[RW]
Link to assets from a dedicated server.
debug[RW]
When true, force debug mode :debug => true equals
:expand => true (unless using >= Sprockets 4.0) :digest => false :manifest => false
default_path_options[W]
digest[RW]
When true, the asset paths will return digest paths.
environment[RW]
Set the Sprockets
environment to search for assets. This defaults to the context's environment
method.
expand[RW]
When true, expand assets.
manifest[RW]
The manifest file used for lookup
prefix[W]
protocol[W]
public_path[W]
Public Instance Methods
default_path_options()
click to toggle source
The default options for each asset path method. This is where you can change your default directories for the fallback directory.
# File lib/sprockets/helpers/settings.rb, line 53 def default_path_options @default_path_options ||= { :audio_path => { :dir => 'audios' }, :font_path => { :dir => 'fonts' }, :image_path => { :dir => 'images' }, :javascript_path => { :dir => 'javascripts', :ext => 'js' }, :stylesheet_path => { :dir => 'stylesheets', :ext => 'css' }, :video_path => { :dir => 'videos' } } end
prefix()
click to toggle source
The base URL the Sprocket environment is mapped to. This defaults to '/assets'.
# File lib/sprockets/helpers/settings.rb, line 29 def prefix @prefix ||= '/assets' @prefix.is_a?(Array) ? "/#{@prefix.first}" : @prefix end
protocol()
click to toggle source
Customize the protocol when using asset hosts. If the value is :relative, A relative protocol ('//') will be used.
# File lib/sprockets/helpers/settings.rb, line 38 def protocol @protocol ||= 'http://' end
public_path()
click to toggle source
The path to the public directory, where the assets not managed by Sprockets
will be located. Defaults to './public'
# File lib/sprockets/helpers/settings.rb, line 46 def public_path @public_path ||= './public' end