aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/account.rb
diff options
context:
space:
mode:
authorRhenium <rhenium@rhe.jp>2014-02-23 00:37:08 +0900
committerRhenium <rhenium@rhe.jp>2014-02-23 00:37:08 +0900
commit4ac6d101d90ed3dba3ee5b6db4ae605698fc02fc (patch)
tree8e050e86a5a645b6e6ed85289cabf2fd93467b8e /app/models/account.rb
parentdb2ba7a67890de9bd738cbd9a798193b3ccb5980 (diff)
downloadaclog-4ac6d101d90ed3dba3ee5b6db4ae605698fc02fc.tar.gz
add refresh button to tweets#show
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 4f78dbe..a950105 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -20,6 +20,10 @@ class Account < ActiveRecord::Base
account
end
+ def self.random
+ self.active.order("RAND()").first
+ end
+
def deactivate!
self.status = Account::INACTIVE
self.save! if self.changed?
@@ -42,11 +46,6 @@ class Account < ActiveRecord::Base
oauth_token_secret: oauth_token_secret)
end
- def import(id)
- obj = client.status(id)
- Tweet.from_twitter_object(obj)
- end
-
def following?(target_id)
api_friendship?(self.user_id, target_id)
end