]>
cat aescling's git repositories - mastodon.git/blob - app/controllers/directories_controller.rb
1 # frozen_string_literal: true
3 class DirectoriesController
< ApplicationController
6 before_action
:authenticate_user!
, if: :whitelist_mode?
7 before_action
:require_enabled!
8 before_action
:set_instance_presenter
9 before_action
:set_tag, only
: :show
10 before_action
:set_tags
11 before_action
:set_accounts
12 before_action
:set_pack
29 return not_found
unless Setting
.profile_directory
33 @tag = Tag
.discoverable
.find_by!
(name
: params
[:id].downcase
)
37 @tags = Tag
.discoverable
.limit(30).reject
{ |tag
| tag
.cached_sample_accounts
.empty
? }
41 @accounts = Account
.discoverable
.by_recent_status
.page(params
[:page]).per(40).tap
do |query
|
42 query
.merge!
(Account
.tagged_with(@tag.id
)) if @tag
46 def set_instance_presenter
47 @instance_presenter = InstancePresenter
.new
This page took 0.104406 seconds and 4 git commands to generate.