summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2018-02-28 21:41:43 +0100
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2018-02-28 21:42:32 +0100
commit674c47bc2cedf71f7f52ce07052fed8c0c3578d6 (patch)
tree17d6b6ca8cf66b92ddbeb6d13082e3af0eba5ab9
parent560bde3c5c21f5926acd7c177d6957a0ba3fef7a (diff)
downloadecs-674c47bc2cedf71f7f52ce07052fed8c0c3578d6.tar.gz
ecs-674c47bc2cedf71f7f52ce07052fed8c0c3578d6.zip
Bugfix initializing config data.
Defined? expression evaluated to always true. This was harmless because all configuration parameters should be defined in ecs_config.yml .
-rw-r--r--config/initializers/ecs_00.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/initializers/ecs_00.rb b/config/initializers/ecs_00.rb
index c750fc5..fa7a179 100644
--- a/config/initializers/ecs_00.rb
+++ b/config/initializers/ecs_00.rb
@@ -35,6 +35,6 @@ rescue Exception
Rails.logger.fatal "Reading #{Rails.root.join('config','ecs_config.yml')}"
end
-ECS_CONFIG["participants"]["allow_anonymous"] = false unless defined? ECS_CONFIG["participants"]["allow_anonymous"]
-ECS_CONFIG["participants"]["allow_events"] = true unless defined? ECS_CONFIG["participants"]["allow_events"]
-ECS_CONFIG["admin"]["confirm_actions"] = true unless defined? ECS_CONFIG["admin"]["confirm_actions"]
+ECS_CONFIG["participants"]["allow_anonymous"] ||= false
+ECS_CONFIG["participants"]["allow_events"] ||= true
+ECS_CONFIG["admin"]["confirm_actions"] ||= true