aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/sprockets/helpers')
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 69306ef631..38df9cbf6e 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -70,10 +70,12 @@ module Sprockets
private
def debug_assets?
- Rails.env.development? || Rails.env.test? ||
- params[:debug_assets] == '1' || params[:debug_assets] == 'true'
- rescue NoMethodError
- false
+ begin
+ params[:debug_assets] == '1' ||
+ params[:debug_assets] == 'true'
+ rescue NoMethodError
+ false
+ end || Rails.application.config.assets.debug
end
# Override to specify an alternative prefix for asset path generation.