Permalink
Browse files

Can't use shortcut || operator when 'false' is a legitimate value.

  • Loading branch information...
1 parent 66c455c commit 542244b1715721b82daab94a432a280144d7c50c Seth Morabito committed Oct 24, 2008
Showing with 6 additions and 2 deletions.
  1. +6 −2 server/lib/meta_worker.rb
@@ -348,9 +348,13 @@ def worker_config
# Returns the appropriate configuration value, based on both the
# global config and the per-worker configuration for this worker.
def get_config_value(key_sym, default)
- worker_config[key_sym] ||
- BDRB_CONFIG[:backgroundrb][key_sym] ||
+ if !worker_config[key_sym].nil?
+ worker_config[key_sym]
+ elsif !BDRB_CONFIG[:backgroundrb][key_sym].nil?
+ BDRB_CONFIG[:backgroundrb][key_sym]
+ else
default
+ end
end
def load_rails_env

0 comments on commit 542244b

Please sign in to comment.