diff app/models/tweet.rb @ 66:1161ad2a4390

Take care of rt removal from gem api Double the default count since filtering is done at gem level, not api.
author nanaya <me@myconan.net>
date Tue, 01 Dec 2015 01:34:12 +0900
parents 8983c426e256
children 37356e98b784
line wrap: on
line diff
--- a/app/models/tweet.rb	Tue Dec 01 01:27:22 2015 +0900
+++ b/app/models/tweet.rb	Tue Dec 01 01:34:12 2015 +0900
@@ -1,8 +1,8 @@
 class Tweet
-  def timeline
+  def timeline(options = {})
     @timeline ||=
-      Rails.cache.fetch({ :timeline => @twitter_id }, :expires_in => 5.minutes) do
-        @client.user_timeline(@twitter_id)
+      Rails.cache.fetch({ :timeline => @twitter_id, :options => options }, :expires_in => 5.minutes) do
+        @client.user_timeline(@twitter_id, options)
       end
   end