aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-19 14:47:39 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-19 14:47:39 -0300
commit09cc922ed31bf699b26fafe4822fc7048b821825 (patch)
tree1e0e485805c8b1bf8c27c531422670c058c358e6 /guides
parent361d2ff615b7748b25ae1903892cde9e0a27fd29 (diff)
parentf369bcf9a0dba0a945ca6fe53343c042f54c1fcf (diff)
downloadrails-09cc922ed31bf699b26fafe4822fc7048b821825.tar.gz
rails-09cc922ed31bf699b26fafe4822fc7048b821825.tar.bz2
rails-09cc922ed31bf699b26fafe4822fc7048b821825.zip
Merge pull request #15155 from dskang/digest
Default config.assets.digests to true in development
Diffstat (limited to 'guides')
-rw-r--r--guides/code/getting_started/config/environments/development.rb8
-rw-r--r--guides/source/asset_pipeline.md26
2 files changed, 26 insertions, 8 deletions
diff --git a/guides/code/getting_started/config/environments/development.rb b/guides/code/getting_started/config/environments/development.rb
index ae9ffe209a..5c1c600feb 100644
--- a/guides/code/getting_started/config/environments/development.rb
+++ b/guides/code/getting_started/config/environments/development.rb
@@ -27,4 +27,12 @@ Rails.application.configure do
# Debug mode disables concatenation and preprocessing of assets.
config.assets.debug = true
+
+ # Generate digests for assets URLs.
+ config.assets.digest = true
+
+ # Adds additional error checking when serving assets at runtime.
+ # Checks for improperly declared sprockets dependencies.
+ # Raises helpful error messages.
+ config.assets.raise_runtime_errors = true
end
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md
index 950cfdca29..4d69d5168e 100644
--- a/guides/source/asset_pipeline.md
+++ b/guides/source/asset_pipeline.md
@@ -198,12 +198,9 @@ will result in your assets being included more than once.
WARNING: When using asset precompilation, you will need to ensure that your
controller assets will be precompiled when loading them on a per page basis. By
-default .coffee and .scss files will not be precompiled on their own. This will
-result in false positives during development as these files will work just fine
-since assets are compiled on the fly in development mode. When running in
-production, however, you will see 500 errors since live compilation is turned
-off by default. See [Precompiling Assets](#precompiling-assets) for more
-information on how precompiling works.
+default .coffee and .scss files will not be precompiled on their own. See
+[Precompiling Assets](#precompiling-assets) for more information on how
+precompiling works.
NOTE: You must have an ExecJS supported runtime in order to use CoffeeScript.
If you are using Mac OS X or Windows, you have a JavaScript runtime installed in
@@ -581,8 +578,21 @@ runtime. To disable this behavior you can set:
config.assets.raise_runtime_errors = false
```
-When this option is true asset pipeline will check if all the assets loaded in your application
-are included in the `config.assets.precompile` list.
+When this option is true, the asset pipeline will check if all the assets loaded
+in your application are included in the `config.assets.precompile` list.
+If `config.assets.digests` is also true, the asset pipeline will require that
+all requests for assets include digests.
+
+### Turning Digests Off
+
+You can turn off digests by updating `config/environments/development.rb` to
+include:
+
+```ruby
+config.assets.digests = false
+```
+
+When this option is true, digests will be generated for asset URLs.
### Turning Debugging Off