0
0
Fork 0

Adding hashtag model

This commit is contained in:
Eugen Rochko 2016-11-04 19:12:59 +01:00
parent 6471a548fe
commit 62292797ec
11 changed files with 60 additions and 9 deletions

View file

@ -14,12 +14,12 @@ class Api::V1::AccountsController < ApiController
end
def following
@accounts = @account.following.limit(40)
@accounts = @account.following.with_counters.limit(40)
render action: :index
end
def followers
@accounts = @account.followers.limit(40)
@accounts = @account.followers.with_counters.limit(40)
render action: :index
end

View file

@ -15,12 +15,12 @@ class Api::V1::StatusesController < ApiController
end
def reblogged_by
@accounts = @status.reblogs.includes(:account).limit(40).map(&:account)
@accounts = @status.reblogged_by(40)
render action: :accounts
end
def favourited_by
@accounts = @status.favourites.includes(:account).limit(40).map(&:account)
@accounts = @status.favourited_by(40)
render action: :accounts
end