aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-08-22 11:50:27 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-08-22 11:50:27 -0700
commit0b6da0c65497df4ee9d2f9313ccb9909bdc842e9 (patch)
tree8851f6064b21f98f696a32b1caa47d1d8902029b /actionpack/lib/sprockets
parent999e7ea47d04c4fe01a195fdb8abd39b6bd38fa8 (diff)
parent18b2223b3290c4b3daa310edfc06b4d51161c312 (diff)
downloadrails-0b6da0c65497df4ee9d2f9313ccb9909bdc842e9.tar.gz
rails-0b6da0c65497df4ee9d2f9313ccb9909bdc842e9.tar.bz2
rails-0b6da0c65497df4ee9d2f9313ccb9909bdc842e9.zip
Merge pull request #2411 from ai/debug_assets_by_config
Debug assets by config
Diffstat (limited to 'actionpack/lib/sprockets')
-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 c239af77bc..7200ab1ddd 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.