Move redirect/base body class to view (#31796)

This commit is contained in:
Matt Jankowski 2024-09-12 09:31:50 -04:00 committed by GitHub
parent 8cdc148167
commit 4aa600387e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 22 deletions

View file

@ -4,7 +4,6 @@ class Redirect::BaseController < ApplicationController
vary_by 'Accept-Language'
before_action :set_resource
before_action :set_app_body_class
def show
@redirect_path = ActivityPub::TagManager.instance.url_for(@resource)
@ -14,10 +13,6 @@ class Redirect::BaseController < ApplicationController
private
def set_app_body_class
@body_classes = 'app-body'
end
def set_resource
raise NotImplementedError
end

View file

@ -2,6 +2,8 @@
%meta{ name: 'robots', content: 'noindex, noarchive' }/
%link{ rel: 'canonical', href: @redirect_path }
- content_for :body_classes, 'app-body'
.redirect
.redirect__logo
= link_to render_logo, root_path