Real-time likes with Turbo and Rails
Web-Crunch
In this guide, I aim to help you showcase the popularity of blog posts by adding real-time likes as a polymorphic feature to your Rails app using hotwired.dev and the Turbo framework. Follow this step-by-step guide to set up models, associations, and implement real-time liking functionality.
Prerequisites I'll use my new project called Rails UI alongside this guide, as it solves many of the early (and later) design problems for a typical Rails application. You're free to not use Rails UI, but you'll need to install and configure Devise (or a similar user authentication library) to achieve similar results.
Continue reading: https://web-crunch.com/posts/adding-likes-rails-hotwire-turbo
Github Repo: https://github.com/justalever/likes_hotwire
Hi, I am Andy Leverenz, and I am a product designer and developer. For fun, I design, code, and write. Check out my blog, Web-Crunch https://web-crunch.com, where I publish design and development tutorials with the occasional vlog.
โฅ๏ธ Sponsor me on GitHub https://github.com/sponsors/justalever
โ๏ธ Keep me awake. Buy me a coffee https://www.buymeacoffee.com/webcrunch
๐ฐ One-Click Subscribe: https://www.youtube.com/user/webcrunchblog?sub_confirmation=1
๐ป Previously published at: https://web-crunch.com/posts/adding-likes-rails-hotwire-turbo
๐จ Latest Project: Rails UI - FREE IN ALPHA https://railsui.com
๐Ruby on Rails Course: HELLO RAILS https://hellorails.io
๐ป Check out the blog: https://web-crunch.com
๐ฆ Check out my personal site: https://justalever.com
๐ Links: Weekly Newsletter: https://digest.web-crunch.com/ Twitter: https://twitter.com/webcrunchblog Github: https://github.com/justalever
๐Check out my book on UX Design: "LUXD: Learn User Experience Design" https://web-crunch.com/products/luxd
๐ Check out my FREE book on Tumblr Theming: "Pro Tumblr Theming" https://web-crunch.com/products/ptt ... https://www.youtube.com/watch?v=usoTj3EGGII
88984750 Bytes