]> cat aescling's git repositories - mastodon.git/blob - app/controllers/about_controller.rb
Merge pull request #792 from chapeaumeinfreund/master
[mastodon.git] / app / controllers / about_controller.rb
1 # frozen_string_literal: true
2
3 class AboutController < ApplicationController
4 before_action :set_body_classes
5
6 def index
7 @description = Setting.site_description
8 @open_registrations = Setting.open_registrations
9 @closed_registrations_message = Setting.closed_registrations_message
10
11 @user = User.new
12 @user.build_account
13 end
14
15 def more
16 @description = Setting.site_description
17 @extended_description = Setting.site_extended_description
18 @contact_account = Account.find_local(Setting.site_contact_username)
19 @contact_email = Setting.site_contact_email
20 @user_count = Rails.cache.fetch('user_count') { User.count }
21 @status_count = Rails.cache.fetch('local_status_count') { Status.local.count }
22 @domain_count = Rails.cache.fetch('distinct_domain_count') { Account.distinct.count(:domain) }
23 end
24
25 def terms; end
26
27 private
28
29 def set_body_classes
30 @body_classes = 'about-body'
31 end
32 end
This page took 0.086536 seconds and 4 git commands to generate.