diff options
author | thea <ta.kupler@gmail.com> | 2016-09-06 10:24:23 +0200 |
---|---|---|
committer | thea <ta.kupler@gmail.com> | 2016-09-06 10:24:23 +0200 |
commit | 3bfa7a6ff2f9fba98d7ece62859dfd7d83829fc1 (patch) | |
tree | f5ed154ef8e5c940a58bfff3d415625b6a5254c5 /app/helpers | |
parent | 18cb3ebbcafe09a194c938e8884f9d3f3753f635 (diff) | |
parent | 3b638103ae7c6094d79812f4cbd44bfce320a217 (diff) |
Merge branch 'develop' into thea
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/twitter_helper.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/twitter_helper.rb b/app/helpers/twitter_helper.rb index d20b7da..1081c05 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 @@ -18,6 +20,6 @@ module TwitterHelper end def tweets - twitter_client.user_timeline(twitter_handle).select{ |tweet| tweet.text.start_with?('RT','@')==false} + twitter_client.user_timeline(twitter_handle).select{ |tweet| tweet.text.start_with?('RT','@')==false}.take(3) end end |