Permalink
Browse files

Merge pull request #2690 from dasch/pretty-debug-assets

Make Sprockets::Helpers::RailsHelper#debug_assets? more readable
  • Loading branch information...
2 parents 35f3907 + b59aa35 commit df948f3100b0a4c87801da6f819d7ebebb847aff @tenderlove tenderlove committed Aug 25, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -58,10 +58,10 @@ def asset_path(source, default_ext = nil, body = false, protocol = nil)
private
def debug_assets?
- Rails.application.config.assets.allow_debugging &&
- (Rails.application.config.assets.debug ||
- params[:debug_assets] == '1' ||
- params[:debug_assets] == 'true')
+ config = Rails.application.config.assets
+ param = params[:debug_assets]
+
+ config.allow_debugging && (config.debug || param == '1' || param == 'true')
end
# Override to specify an alternative prefix for asset path generation.

0 comments on commit df948f3

Please sign in to comment.