0
0
Fork 0

Distrubute statuses as a fan-out-on-write system, with optional precomputing

This commit is contained in:
Eugen Rochko 2016-03-08 20:16:11 +01:00
parent fe57f6330f
commit 6c4c84b161
9 changed files with 119 additions and 3 deletions

View file

@ -2,6 +2,7 @@ class HomeController < ApplicationController
before_action :authenticate_user!
def index
@statuses = Status.where(account: ([current_user.account] + current_user.account.following)).where('reblog_of_id IS NULL OR account_id != ?', current_user.account.id).order('created_at desc')
feed = Feed.new(:home, current_user.account)
@statuses = feed.get(20, (params[:offset] || 0).to_i)
end
end