▶️ Watch Entire Ruby on Rails Playlist ✅ Subscribe To My KZbin Channel: bit.ly/3hvlr7P bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN ▶️ Get The Code bit.ly/3iLOq97
@MrSuperNova462 жыл бұрын
what if someone inspects the page changes the id value, and submits, does it add a friend to another user?
@CharlesDv3 жыл бұрын
You should assign the current user id inside the controller or model instead of as a hidden input. Thanks.
@chokopepites62952 ай бұрын
yeah, you' re right, in the method create : " @friend = Friend.new(friend_params) @friend.user_id = current_user.id " Cleanest and more secure
@robertmasters01 Жыл бұрын
would you be able to show how a sorting feature would work with ruby on rails, with say sort by first name in alphabetical order?