Polymorphic associations with Ruby on Rails - like all the things
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
Thanks for the tutorial CJ! Been following these series since the beginning. Don't stop please
Another great episode. Like all the walkthroughs and detailed explanations.
Really great episode !!! Thank you for sharing your knowledge !!!
Thanks for watching, Daniel!
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.
Neat! Quick question though: what's your vim setup like?
Thanks for watching, Giant Gosling! czcams.com/video/tM2j_fssDuM/video.html
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