]> cat aescling's git repositories - mastodon.git/blob - app/controllers/about_controller.rb
Redesign the landing page, mount public timeline on it (#4122)
[mastodon.git] / app / controllers / about_controller.rb
1 # frozen_string_literal: true
2
3 class AboutController < ApplicationController
4 before_action :set_body_classes
5 before_action :set_instance_presenter, only: [:show, :more, :terms]
6
7 def show
8 serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer)
9 @initial_state_json = serializable_resource.to_json
10 end
11
12 def more; end
13
14 def terms; end
15
16 private
17
18 def new_user
19 User.new.tap(&:build_account)
20 end
21
22 helper_method :new_user
23
24 def set_instance_presenter
25 @instance_presenter = InstancePresenter.new
26 end
27
28 def set_body_classes
29 @body_classes = 'about-body'
30 end
31
32 def initial_state_params
33 {
34 settings: {},
35 token: current_session&.token,
36 }
37 end
38 end
This page took 0.076603 seconds and 4 git commands to generate.