提交 b59aa358 编写于 作者: D Daniel Schierbeck

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

上级 68424fb1
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册