From 21ec91258ef852be7a444cad7be3e0f71748fa88 Mon Sep 17 00:00:00 2001 From: KOH6 Date: Wed, 20 Sep 2023 14:43:10 +0900 Subject: [PATCH] =?UTF-8?q?rubocop=E9=81=A9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 5656e7b..2478462 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -10,10 +10,10 @@ def show end def edit - if params[:id].to_i != current_user.id - redirect_to root_path, flash: { danger: '自分以外のプロフィールは編集できません。' } - return - end + return unless params[:id].to_i != current_user.id + + redirect_to root_path, flash: { danger: '自分以外のプロフィールは編集できません。' } + nil end def update