]> git.openstreetmap.org Git - rails.git/commitdiff
Render unknown user with concerns code in notes controller
authorAnton Khorev <tony29@yandex.ru>
Sun, 20 Aug 2023 22:27:59 +0000 (01:27 +0300)
committerAnton Khorev <tony29@yandex.ru>
Mon, 21 Aug 2023 14:30:23 +0000 (17:30 +0300)
app/controllers/concerns/user_methods.rb
app/controllers/notes_controller.rb

index 6d92aac79574ffc371c3267431ff087f7c828237..eb7d389881eba94f5f8fad65dd197f94eaa9c92d 100644 (file)
@@ -18,7 +18,7 @@ module UserMethods
     @not_found_user = name
 
     respond_to do |format|
     @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
       format.all { head :not_found }
     end
   end
index 6b2a3a86b81bb7fed0e07a817f27f3fde30d3275..0bca294be5e2df4111d440c18f56b26674239ca9 100644 (file)
@@ -27,10 +27,7 @@ class NotesController < ApplicationController
 
         render :layout => "site"
       else
 
         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
       end
     end
   end