diff options
author | rhenium <rhenium@rhe.jp> | 2014-10-11 07:22:28 +0900 |
---|---|---|
committer | rhenium <rhenium@rhe.jp> | 2014-10-11 07:22:28 +0900 |
commit | 27c820e260aa42273d1dbaf8a0a803a4c9e87743 (patch) | |
tree | 62e507313615084c2035f74df4bba6a1a7e1e988 /app/models/tweet.rb | |
parent | 4751d3adee9a73a49a47b87b6bc27634342d0a48 (diff) | |
download | aclog-27c820e260aa42273d1dbaf8a0a803a4c9e87743.tar.gz |
cleanup
Diffstat (limited to 'app/models/tweet.rb')
-rw-r--r-- | app/models/tweet.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/tweet.rb b/app/models/tweet.rb index c14dbda..009f868 100644 --- a/app/models/tweet.rb +++ b/app/models/tweet.rb @@ -60,10 +60,10 @@ class Tweet < ActiveRecord::Base # Imports a Tweet from Twitter REST API. # If the client is not specified, An random account will be selected from database. # @param [Integer] id Target status ID. - # @param [Twitter::REST::Client] client The Twitter::REST::Client to be used. + # @param [Account] client The Twitter::REST::Client to be used. # @return [Tweet] The Tweet instance imported. - def import_from_twitter(id, client = nil) - client ||= Account.random.client + def import_from_twitter(id, account = nil) + client = (account || Account.random).client st = client.status(id) self.create_bulk_from_json([st.attrs]) |