Skip to content
Browse files

Make Sprockets::Helpers::RailsHelper#debug_assets? more readable

  • Loading branch information...
1 parent 68424fb commit b59aa358bb311d3d06c5df856a1d57124b857d5a @dasch dasch committed Aug 25, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/lib/sprockets/helpers/rails_helper.rb
View
8 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 b59aa35

Please sign in to comment.
Something went wrong with that request. Please try again.