Skip to main content

Subscribe to GoRails to get access to this episode and all other pro episodes, and new awesome content every month.

Subscribe Now
Only $19/month

Unlimited access. Cancel anytime.

23 Repost / Retweet / Reblog

Episode 118 · May 10, 2016

Learn how to add the common "Retweet" or "Reblog" functionality in your Rails app with self-referential associations

Sharing


Transcripts

Subscribe or login to view the transcript for this episode.

Discussion


Gravatar

Thanks Chris! Sure, would love to see the follow and following relationship added to this in future.


Gravatar

Thanks Chris!! Would love to see the follow and following relationship added to this in the future too


Gravatar

Hi Chris, Great tutorial! I was wondering how to setup liking posts when I don't have any user records. Assuming I want to setup it for my blog and for sure I'm going to be the only user so how could I implement it?!


Gravatar
This was just what I needed, man. I tried to build out this feature myself and I ended up making it way more complicated than it should have been. I also now understand a few more things about Rails, so thanks for this. 
Gravatar
Great to hear Dan! Let me know if there are any other features like this you'd like to see!

Gravatar
Hey Chris, you may have forgotten one important component for this feature. The unsharing AJAX button for the second state. Currently, my repost feature breaks when I mistakenly double click and record the changes into the db. Can you provide a quick update to this solution to balance it out and then post the updated repository link? Thanks!

Gravatar
Its such a unique solution that its very hard to alter without complicating the logic. Also, we should be able to get the count for the shares, and also access the users that shared the posts. Example: rebecca, john, toby, tyler shared.

Login or create an account to join the conversation.