Skip to content

Commit

Permalink
rails_best_practices対応
Browse files Browse the repository at this point in the history
  • Loading branch information
KOH6 committed Sep 20, 2023
1 parent f3d1489 commit ab23c5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def show
end

def edit
return unless current_user != User.find(params[:id])
return unless current_user.id != params[:id].to_i

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 user_path(current_user), flash: { danger: '自分以外のプロフィールは編集できません。' }
nil
Expand Down

0 comments on commit ab23c5b

Please sign in to comment.