diff options
author | reverite <samantha@chalker.io> | 2019-03-15 05:54:30 -0700 |
---|---|---|
committer | reverite <samantha@chalker.io> | 2019-03-15 05:54:30 -0700 |
commit | 75eeb003b09c53d3b4e98046d1c20b0ad8a887bb (patch) | |
tree | d2ae669ee583c613a474f8698b7ea718da803819 /app/controllers/about_controller.rb | |
parent | 41d1369391d70a9cd25bdf96cfe567975793ef5a (diff) | |
parent | c2fa0f7c40bcc4064e8baaa221665eadd391c001 (diff) |
Merge remote-tracking branch 'glitch/master' into production
Diffstat (limited to 'app/controllers/about_controller.rb')
-rw-r--r-- | app/controllers/about_controller.rb | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb index ce1e8293c..f459bab19 100644 --- a/app/controllers/about_controller.rb +++ b/app/controllers/about_controller.rb @@ -2,21 +2,17 @@ class AboutController < ApplicationController before_action :set_pack - before_action :set_body_classes + layout 'public' + before_action :set_instance_presenter, only: [:show, :more, :terms] def show - serializable_resource = ActiveModelSerializers::SerializableResource.new(InitialStatePresenter.new(initial_state_params), serializer: InitialStateSerializer) - @initial_state_json = serializable_resource.to_json + @hide_navbar = true end - def more - render layout: 'public' - end + def more; end - def terms - render layout: 'public' - end + def terms; end private @@ -27,21 +23,10 @@ class AboutController < ApplicationController helper_method :new_user def set_pack - use_pack action_name == 'show' ? 'about' : 'common' + use_pack 'common' end def set_instance_presenter @instance_presenter = InstancePresenter.new end - - def set_body_classes - @body_classes = 'with-modals' - end - - def initial_state_params - { - settings: { known_fediverse: Setting.show_known_fediverse_at_about_page }, - token: current_session&.token, - } - end end |