Skip to content

Commit

Permalink
rubocop適用
Browse files Browse the repository at this point in the history
  • Loading branch information
KOH6 committed Sep 20, 2023
1 parent 0fd6dac commit 21ec912
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check notice on line 13 in app/controllers/users_controller.rb

View workflow job for this annotation

GitHub Actions / rails_best_practices

[rails_best_practices] app/controllers/users_controller.rb#L13

use scope access
Raw output
/home/runner/work/twitter_clone/twitter_clone/app/controllers/users_controller.rb:13 - use scope access

redirect_to root_path, flash: { danger: '自分以外のプロフィールは編集できません。' }
nil
end

def update
Expand Down

0 comments on commit 21ec912

Please sign in to comment.