diff options
Diffstat (limited to 'app/presenters/instance_presenter.rb')
-rw-r--r-- | app/presenters/instance_presenter.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb index 4de6b5e0d..1c08fb3bc 100644 --- a/app/presenters/instance_presenter.rb +++ b/app/presenters/instance_presenter.rb @@ -21,7 +21,7 @@ class InstancePresenter end def status_count - Rails.cache.fetch('local_status_count') { Status.local.count } + Rails.cache.fetch('local_status_count') { Account.local.sum(:statuses_count) } end def domain_count @@ -40,4 +40,12 @@ class InstancePresenter '' end end + + def source_url + Mastodon::Version.source_url + end + + def thumbnail + @thumbnail ||= Rails.cache.fetch('site_uploads/thumbnail') { SiteUpload.find_by(var: 'thumbnail') } + end end |