]>
cat aescling's git repositories - mastodon.git/blob - app/presenters/instance_presenter.rb
1 # frozen_string_literal: true
3 class InstancePresenter
5 :closed_registrations_message,
9 :site_short_description,
11 :site_extended_description,
17 Account
.find_local(Setting
.site_contact_username
.gsub(/\A@/, ''))
21 Rails
.cache
.fetch('user_count') { User
.confirmed
.count
}
25 Rails
.cache
.fetch('local_status_count') { Account
.local
.sum(:statuses_count) }
29 Rails
.cache
.fetch('distinct_domain_count') { Account
.distinct
.count(:domain) }
37 Mastodon
::Version.source_url
41 @thumbnail ||= Rails
.cache
.fetch('site_uploads/thumbnail') { SiteUpload
.find_by(var
: 'thumbnail') }
45 @hero ||= Rails
.cache
.fetch('site_uploads/hero') { SiteUpload
.find_by(var
: 'hero') }
49 @mascot ||= Rails
.cache
.fetch('site_uploads/mascot') { SiteUpload
.find_by(var
: 'mascot') }
This page took 0.129185 seconds and 5 git commands to generate.