aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets/helpers
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2011-08-22 23:19:25 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2011-08-24 09:53:55 -0500
commit827cdae6fb5e21056b68ab8a89047ae82738871f (patch)
treeb310c5bb59464b2e6f769b61928e7dedf9a40869 /actionpack/lib/sprockets/helpers
parent52207ecc81816140c05d216164aa745cf652f3b3 (diff)
downloadrails-827cdae6fb5e21056b68ab8a89047ae82738871f.tar.gz
rails-827cdae6fb5e21056b68ab8a89047ae82738871f.tar.bz2
rails-827cdae6fb5e21056b68ab8a89047ae82738871f.zip
Add config.allow_debugging option to determine if the debug_assets query param can be passed by user
Diffstat (limited to 'actionpack/lib/sprockets/helpers')
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 4fb8d0af37..50a8db4000 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -70,9 +70,10 @@ module Sprockets
private
def debug_assets?
- params[:debug_assets] == '1' ||
- params[:debug_assets] == 'true' ||
- Rails.application.config.assets.debug
+ Rails.application.config.assets.allow_debugging &&
+ (Rails.application.config.assets.debug ||
+ params[:debug_assets] == '1' ||
+ params[:debug_assets] == 'true')
end
# Override to specify an alternative prefix for asset path generation.