0
0
Fork 0

Adding hashtags

This commit is contained in:
Eugen Rochko 2016-11-05 15:20:05 +01:00
parent 62292797ec
commit 48b9619439
33 changed files with 305 additions and 62 deletions

View file

@ -74,6 +74,19 @@ class Api::V1::StatusesController < ApiController
render action: :index
end
def tag
@tag = Tag.find_by(name: params[:id].downcase)
if @tag.nil?
@statuses = []
else
@statuses = Status.as_tag_timeline(@tag, current_user.account).paginate_by_max_id(20, params[:max_id], params[:since_id]).to_a
set_maps(@statuses)
end
render action: :index
end
private
def set_status