diff options
author | Andrey A.I. Sitnik <andrey@sitnik.ru> | 2011-08-22 09:36:36 +1100 |
---|---|---|
committer | Andrey A.I. Sitnik <andrey@sitnik.ru> | 2011-08-22 09:36:36 +1100 |
commit | 18b2223b3290c4b3daa310edfc06b4d51161c312 (patch) | |
tree | 4107f4333868c2c495ca0e596d41533f291c231a /actionpack/lib | |
parent | 63d3809e31cc9c0ed3b2e30617310407ae614fd4 (diff) | |
download | rails-18b2223b3290c4b3daa310edfc06b4d51161c312.tar.gz rails-18b2223b3290c4b3daa310edfc06b4d51161c312.tar.bz2 rails-18b2223b3290c4b3daa310edfc06b4d51161c312.zip |
Allow to debug assets by config.assets.debug
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/sprockets/helpers/rails_helper.rb | 10 |
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. |