about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-07-28 19:25:33 +0200
committerGitHub <noreply@github.com>2018-07-28 19:25:33 +0200
commitbb71538bb503159177d46d8956bd466973c0876b (patch)
tree41e39f53b365d91f83cfe393d75ddf8a1624ded9 /app/controllers
parente23b26178a71f90d64fe2a3e9e4468f265ecc71c (diff)
Redesign public profiles and toots (#8068)
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/account_controller_concern.rb5
-rw-r--r--app/controllers/statuses_controller.rb5
2 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/concerns/account_controller_concern.rb b/app/controllers/concerns/account_controller_concern.rb
index 5b9981aa2..6c27ef330 100644
--- a/app/controllers/concerns/account_controller_concern.rb
+++ b/app/controllers/concerns/account_controller_concern.rb
@@ -8,6 +8,7 @@ module AccountControllerConcern
   included do
     layout 'public'
     before_action :set_account
+    before_action :set_instance_presenter
     before_action :set_link_headers
     before_action :check_account_suspension
   end
@@ -18,6 +19,10 @@ module AccountControllerConcern
     @account = Account.find_local!(params[:account_username])
   end
 
+  def set_instance_presenter
+    @instance_presenter = InstancePresenter.new
+  end
+
   def set_link_headers
     response.headers['Link'] = LinkHeader.new(
       [
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb
index b85341822..755af1deb 100644
--- a/app/controllers/statuses_controller.rb
+++ b/app/controllers/statuses_controller.rb
@@ -12,6 +12,7 @@ class StatusesController < ApplicationController
 
   before_action :set_account
   before_action :set_status
+  before_action :set_instance_presenter
   before_action :set_link_headers
   before_action :check_account_suspension
   before_action :redirect_to_original, only: [:show]
@@ -148,6 +149,10 @@ class StatusesController < ApplicationController
     raise ActiveRecord::RecordNotFound
   end
 
+  def set_instance_presenter
+    @instance_presenter = InstancePresenter.new
+  end
+
   def check_account_suspension
     gone if @account.suspended?
   end