implement current_user

This commit is contained in:
João Victor Geonizeli
2022-02-28 09:48:51 -03:00
parent 6cc48afcb1
commit e465123190
7 changed files with 35 additions and 29 deletions

View File

@@ -21,6 +21,9 @@ class UserFollowsController < ApplicationController
# Only allow a list of trusted parameters through.
def user_follow_params
params.require(:user_follow).permit(:follower_id, :followed_id)
{
follower: current_user,
**params.require(:user_follow).permit(:followed_id)
}
end
end