diff options
author | luca-marie <ml.kochsiek@fu-berlin.de> | 2016-08-26 17:16:35 +0200 |
---|---|---|
committer | thea <ta.kupler@gmail.com> | 2016-09-01 12:09:37 +0200 |
commit | e87d797cdbfe5ebe8dff789742adb6a82d92aae4 (patch) | |
tree | 6cd29e707506b779714f1947f6113b85ba02844f /app/helpers | |
parent | 1959dd6077d9cac95d678b5378022234ccbf979b (diff) |
Small updates on method to check if twitter feed enabled
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/twitter_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/twitter_helper.rb b/app/helpers/twitter_helper.rb index 9fd4ffd..b01293f 100644 --- a/app/helpers/twitter_helper.rb +++ b/app/helpers/twitter_helper.rb @@ -1,4 +1,7 @@ module TwitterHelper + def twitter_enabled + Rails.application.secrets.twitter['enabled'] == true + end def twitter_client Twitter::REST::Client.new do |config| @@ -20,5 +23,3 @@ module TwitterHelper twitter_client.user_timeline(twitter_handle).select{ |tweet| tweet.text.start_with?('RT','@')==false} end end - -# unless Rails.application.secrets.twitter['enabled'] == false |