aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorAndrey A.I. Sitnik <andrey@sitnik.ru>2011-08-22 09:36:36 +1100
committerAndrey A.I. Sitnik <andrey@sitnik.ru>2011-08-22 09:36:36 +1100
commit18b2223b3290c4b3daa310edfc06b4d51161c312 (patch)
tree4107f4333868c2c495ca0e596d41533f291c231a /railties
parent63d3809e31cc9c0ed3b2e30617310407ae614fd4 (diff)
downloadrails-18b2223b3290c4b3daa310edfc06b4d51161c312.tar.gz
rails-18b2223b3290c4b3daa310edfc06b4d51161c312.tar.bz2
rails-18b2223b3290c4b3daa310edfc06b4d51161c312.zip
Allow to debug assets by config.assets.debug
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/asset_pipeline.textile2
-rw-r--r--railties/lib/rails/application/configuration.rb1
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt3
3 files changed, 5 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index 34ab00e80d..012149c40e 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -224,7 +224,7 @@ If any of the files in the manifest have changed between requests, the server re
h4. Debugging Assets
-You can put +?debug_assets=true+ or +?debug_assets=1+ at the end of a URL and Sprockets expands the lines which load the assets. For example, if you had an +app/assets/javascripts/application.js+ file containing these lines:
+You can put +?debug_assets=true+ or +?debug_assets=1+ at the end of a URL or set +config.assets.debug+ and Sprockets expands the lines which load the assets. For example, if you had an +app/assets/javascripts/application.js+ file containing these lines:
<plain>
//= require "projects"
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb
index cd850b6a75..f1add68890 100644
--- a/railties/lib/rails/application/configuration.rb
+++ b/railties/lib/rails/application/configuration.rb
@@ -38,6 +38,7 @@ module Rails
@assets.precompile = [ /\w+\.(?!js|css).+/, /application.(css|js)$/ ]
@assets.prefix = "/assets"
@assets.version = ''
+ @assets.debug = false
@assets.cache_store = [ :file_store, "#{root}/tmp/cache/assets/" ]
@assets.js_compressor = nil
diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
index 3e0c29a587..47078e3af9 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
@@ -29,4 +29,7 @@
# Do not compress assets
config.assets.compress = false
+
+ # Expands the lines which load the assets
+ config.assets.debug = true
end