0
0
Fork 0

Add server rules (#15769)

This commit is contained in:
Eugen Rochko 2021-02-21 19:50:12 +01:00 committed by GitHub
parent dcc7c686f3
commit 8331fdf7e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 258 additions and 2 deletions

View file

@ -16,6 +16,10 @@ class InstancePresenter
Account.find_local(Setting.site_contact_username.strip.gsub(/\A@/, ''))
end
def rules
Rule.ordered
end
def user_count
Rails.cache.fetch('user_count') { User.confirmed.joins(:account).merge(Account.without_suspended).count }
end