Polymorphic associations with Ruby on Rails - like all the things

Sdílet
Vložit
  • čas přidán 31. 08. 2021
  • In this episode, you'll learn how to migrate from a one to many association to a polymorphic association. Imagine you've implemented a like button for a blog post. You're tracking whether a user has liked a post or not using a Like model related directly to the post. Now you want to also support "liking" other objects: comments, images, friends, etc. In this episode, you'll see how to modify the database to support these polymorphic associations between a Like model and any other "likeable" model.
    #rails #rubyonrails
  • Jak na to + styl

Komentáře • 8

  • @cosenocsibb8144
    @cosenocsibb8144 Před 2 lety

    Thanks for the tutorial CJ! Been following these series since the beginning. Don't stop please

  • @Steven-ri5zy
    @Steven-ri5zy Před 2 lety

    Another great episode. Like all the walkthroughs and detailed explanations.

  • @gagnedan2k
    @gagnedan2k Před 2 lety

    Really great episode !!! Thank you for sharing your knowledge !!!

    • @cjav_dev
      @cjav_dev  Před 2 lety

      Thanks for watching, Daniel!

  • @DevBishwasBh
    @DevBishwasBh Před rokem

    Thanks a lot my brother. It was a lot helpful. I am developing an open source multi-blogging system with rails, using this knowledge there.

  • @ItzAnameOk
    @ItzAnameOk Před 2 lety

    Neat! Quick question though: what's your vim setup like?

    • @cjav_dev
      @cjav_dev  Před 2 lety

      Thanks for watching, Giant Gosling! czcams.com/video/tM2j_fssDuM/video.html

  • @nelsonchavespro
    @nelsonchavespro Před 2 lety

    Hey thankful for your videos. Have you created this in another video where when you click like the page, It doesnt refresh the page? I'm on rails 7