From 2d39ba79542c9ce1026d8f9c90fa9afd766e1e2c Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 21 Aug 2023 01:27:59 +0300 Subject: [PATCH] Render unknown user with concerns code in notes controller --- app/controllers/concerns/user_methods.rb | 2 +- app/controllers/notes_controller.rb | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/concerns/user_methods.rb b/app/controllers/concerns/user_methods.rb index 6d92aac79..eb7d38988 100644 --- a/app/controllers/concerns/user_methods.rb +++ b/app/controllers/concerns/user_methods.rb @@ -18,7 +18,7 @@ module UserMethods @not_found_user = name respond_to do |format| - format.html { render :template => "users/no_such_user", :status => :not_found } + format.html { render :template => "users/no_such_user", :status => :not_found, :layout => "site" } format.all { head :not_found } end end diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index 6b2a3a86b..0bca294be 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -27,10 +27,7 @@ class NotesController < ApplicationController render :layout => "site" else - @title = t "users.no_such_user.title" - @not_found_user = params[:display_name] - - render :template => "users/no_such_user", :status => :not_found, :layout => "site" + render_unknown_user params[:display_name] end end end -- 2.39.5