diff options
author | Ondřej Hruška <ondra@ondrovo.com> | 2017-09-28 09:12:17 +0200 |
---|---|---|
committer | Ondřej Hruška <ondra@ondrovo.com> | 2017-09-28 09:12:17 +0200 |
commit | 9330ea1f4d34b6ef4ce6e841f1aa931a7f10f749 (patch) | |
tree | 81e346b3d9ca532b3d252135d82ce20f61780a36 /app/presenters | |
parent | 06e299cef591b63bd96f320eadc873b047cd2664 (diff) | |
parent | 4aea3f88a6d30f102a79c2da7fcfac96465ba1a8 (diff) |
Merge commit '4aea3f88a6d30f102a79c2da7fcfac96465ba1a8' into merging-upstream
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/instance_presenter.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb index b1afb9e1f..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 @@ -44,4 +44,8 @@ class InstancePresenter def source_url Mastodon::Version.source_url end + + def thumbnail + @thumbnail ||= Rails.cache.fetch('site_uploads/thumbnail') { SiteUpload.find_by(var: 'thumbnail') } + end end |