From 24646d57690ad36cf4caecab2eec5774bca7f699 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 26 Feb 2016 20:48:20 +0100 Subject: Adding views for the profile and entry pages --- app/models/user.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models') 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 -- cgit