Give Each User A Friends List With Rails Associations - Ruby On Rails Friend List App #8

Поділитися
Вставка
  • Опубліковано 18 січ 2025

КОМЕНТАРІ • 11

  • @Codemycom
    @Codemycom  4 роки тому +1

    ▶️ Watch Entire Ruby on Rails Playlist ✅ Subscribe To My UA-cam 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

    • @MrSuperNova46
      @MrSuperNova46 2 роки тому

      what if someone inspects the page changes the id value, and submits, does it add a friend to another user?

  • @CharlesDv
    @CharlesDv 3 роки тому +12

    You should assign the current user id inside the controller or model instead of as a hidden input. Thanks.

    • @chokopepites6295
      @chokopepites6295 3 місяці тому

      yeah, you' re right, in the method create :
      "
      @friend = Friend.new(friend_params)
      @friend.user_id = current_user.id "
      Cleanest and more secure

  • @robertmasters01
    @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?

  • @ericyoung4542
    @ericyoung4542 2 роки тому

    Fantastic tutorial!

  • @skyleonidas9270
    @skyleonidas9270 4 роки тому

    Very Nice

  • @rociomartinez1917
    @rociomartinez1917 4 роки тому

    Thank you