Skip to content

Commit

Permalink
Use Hash#fetch instead of testing for #key?
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Feb 13, 2012
1 parent 9b9838e commit 6960e48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/sprockets/railtie.rb
Expand Up @@ -24,7 +24,7 @@ class Railtie < ::Rails::Railtie
env.version = ::Rails.env + "-#{config.assets.version}"

if config.assets.logger != false
env.logger = config.assets.logger || ::Rails.logger
env.logger = config.assets.logger || ::Rails.logger
end

if config.assets.cache_store != false
Expand Down
4 changes: 2 additions & 2 deletions actionpack/lib/sprockets/static_compiler.rb
Expand Up @@ -8,8 +8,8 @@ def initialize(env, target, paths, options = {})
@env = env
@target = target
@paths = paths
@digest = options.key?(:digest) ? options.delete(:digest) : true
@manifest = options.key?(:manifest) ? options.delete(:manifest) : true
@digest = options.fetch(:digest, true)
@manifest = options.fetch(:manifest, true)
@manifest_path = options.delete(:manifest_path) || target
@zip_files = options.delete(:zip_files) || /\.(?:css|html|js|svg|txt|xml)$/
end
Expand Down

0 comments on commit 6960e48

Please sign in to comment.