diff options
author | thea <ta.kupler@gmail.com> | 2016-09-05 17:35:37 +0200 |
---|---|---|
committer | thea <ta.kupler@gmail.com> | 2016-09-05 17:35:37 +0200 |
commit | ae0912e451e14c9d373d694666122c7ae1507ac6 (patch) | |
tree | 09e631f966eb81e6b0c5377c6cde15b6c45658b0 /app/helpers | |
parent | ea3fc6ffbb8f90aff28ce56fe4432a8d3ff18caa (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
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/twitter_helper.rb | 4 |
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 |