From: Anton Khorev Date: Sun, 20 Aug 2023 22:27:59 +0000 (+0300) Subject: Render unknown user with concerns code in notes controller X-Git-Tag: live~1333^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2d39ba79542c9ce1026d8f9c90fa9afd766e1e2c Render unknown user with concerns code in notes controller --- 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