mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Documentation fixes
This commit is contained in:
parent
e145acd6f1
commit
871696a01a
1 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ It is recommended that you use the defaults for all new apps.
|
|||
|
||||
h4. Main Features
|
||||
|
||||
The first feature of the pipeline is to concatenate assets. This is important in a production environment, as it reduces the number of requests that a browser must make to render a web page. While Rails already has a feature to concatenate these types of assetsi -- by placing +:cache => true+ at the end of tags such as +javascript_include_tag+ and +stylesheet_link_tag+ -- many people do not use it.
|
||||
The first feature of the pipeline is to concatenate assets. This is important in a production environment, as it reduces the number of requests that a browser must make to render a web page. While Rails already has a feature to concatenate these types of assets -- by placing +:cache => true+ at the end of tags such as +javascript_include_tag+ and +stylesheet_link_tag+ -- many people do not use it.
|
||||
|
||||
The default behavior in Rails 3.1 and onward is to concatenate all files into one master file each for JS and CSS. However, you can separate files or groups of files if required (see below). In production, an MD5 fingerprint is inserted into each filename so that the file is cached by the web browser but can be invalidated if the fingerprint is altered.
|
||||
|
||||
|
@ -133,7 +133,7 @@ Otherwise, Sprockets looks through the available paths until it finds a file tha
|
|||
If you want to use a "css data URI":http://en.wikipedia.org/wiki/Data_URI_scheme -- a method of embedding the image data directly into the CSS file -- you can use the +asset_data_uri+ helper.
|
||||
|
||||
<plain>
|
||||
#logo { background: url(<%= asset_data_uri 'logo.png' %>)
|
||||
#logo { background: url(<%= asset_data_uri 'logo.png' %>) }
|
||||
</plain>
|
||||
|
||||
This inserts a correctly-formatted data URI into the CSS source.
|
||||
|
@ -282,7 +282,7 @@ Rails comes bundled with a rake task to compile the manifests to files on disc.
|
|||
The rake task is:
|
||||
|
||||
<plain>
|
||||
rake assets:precompile
|
||||
bundle exec rake assets:precompile
|
||||
</plain>
|
||||
|
||||
Capistrano (v2.8.0+) has a recipe to handle this in deployment. Add the following line to +Capfile+:
|
||||
|
|
Loading…
Reference in a new issue