summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthea <ta.kupler@gmail.com>2016-09-05 17:35:37 +0200
committerthea <ta.kupler@gmail.com>2016-09-05 17:35:37 +0200
commitae0912e451e14c9d373d694666122c7ae1507ac6 (patch)
tree09e631f966eb81e6b0c5377c6cde15b6c45658b0
parentea3fc6ffbb8f90aff28ce56fe4432a8d3ff18caa (diff)
resolved bug from PR #236. Included test environment to secrets-file and included checking wheather secrets-file exists before running code in twitter_helper
-rw-r--r--app/helpers/twitter_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/twitter_helper.rb b/app/helpers/twitter_helper.rb
index d20b7da..b360895 100644
--- a/app/helpers/twitter_helper.rb
+++ b/app/helpers/twitter_helper.rb
@@ -1,6 +1,8 @@
module TwitterHelper
def twitter_enabled
- Rails.application.secrets.twitter['enabled'] == true
+ if Rails.application.secrets.twitter
+ Rails.application.secrets.twitter['enabled'] == true
+ end
end
def twitter_client