From ea76beb1bf3d306e58da58a2bdbeecbb68b85613 Mon Sep 17 00:00:00 2001 From: yystopf Date: Tue, 8 Oct 2024 10:22:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=A4=84=E7=90=86ow?= =?UTF-8?q?ners=20.json=E5=90=8E=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/owners_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/owners_controller.rb b/app/controllers/owners_controller.rb index eadbdbf95..7ca5f0d39 100644 --- a/app/controllers/owners_controller.rb +++ b/app/controllers/owners_controller.rb @@ -11,7 +11,8 @@ class OwnersController < ApplicationController end def show - @owner = Owner.find_by(login: params[:id]) || Owner.find_by(id: params[:id]) + login = params[:id].to_s[0..-6] + @owner = Owner.find_by(login: login) || Owner.find_by(id: login) clear_user_cookie unless @owner.present? return render_not_found unless @owner.present? # 组织