mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
use Hash#delete with a default block
This commit is contained in:
parent
4b45fcffea
commit
563df87f19
1 changed files with 3 additions and 3 deletions
|
@ -19,9 +19,9 @@ module Sprockets
|
|||
|
||||
def javascript_include_tag(*sources)
|
||||
options = sources.extract_options!
|
||||
debug = options.key?(:debug) ? options.delete(:debug) : debug_assets?
|
||||
body = options.key?(:body) ? options.delete(:body) : false
|
||||
digest = options.key?(:digest) ? options.delete(:digest) : digest_assets?
|
||||
debug = options.delete(:debug) { debug_assets? }
|
||||
body = options.delete(:body) { false }
|
||||
digest = options.delete(:digest) { digest_assets? }
|
||||
|
||||
sources.collect do |source|
|
||||
if debug && asset = asset_paths.asset_for(source, 'js')
|
||||
|
|
Loading…
Reference in a new issue