]> cat aescling's git repositories - mastodon.git/blob - app/controllers/about_controller.rb
Adding about/more page with extended information that can be set up by an admin
[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 end
9
10 def more
11 @description = Setting.site_description
12 @extended_description = Setting.site_extended_description
13 @contact_account = Account.find_local(Setting.site_contact_username)
14 @contact_email = Setting.site_contact_email
15 @user_count = Rails.cache.fetch('user_count') { User.count }
16 @status_count = Rails.cache.fetch('local_status_count') { Status.local.count }
17 @domain_count = Rails.cache.fetch('distinct_domain_count') { Account.distinct.count(:domain) }
18 end
19
20 def terms; end
21
22 private
23
24 def set_body_classes
25 @body_classes = 'about-body'
26 end
27 end
This page took 0.077531 seconds and 5 git commands to generate.