about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-26 20:48:20 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-26 20:48:20 +0100
commit24646d57690ad36cf4caecab2eec5774bca7f699 (patch)
treee6118271d38a47edb6b7518ff5dacedb76cbf7f9 /app/models
parentf16b31f0773c2fd1122ff0ad98cb392e762f0d0b (diff)
Adding views for the profile and entry pages
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index d23f5d608..c54a5fab3 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -2,4 +2,8 @@ class User < ActiveRecord::Base
   belongs_to :account, inverse_of: :user
 
   validates :account, presence: true
+
+  def timeline
+    StreamEntry.where(account_id: self.account.following, activity_type: 'Status').order('id desc')
+  end
 end