summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/twitter_helper.rb5
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