Repost / Retweet / Reblog Discussion
Thanks Chris! Sure, would love to see the follow and following relationship added to this in future.
Thanks Chris!! Would love to see the follow and following relationship added to this in the future too
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?!
Any help on this please; how can I count the number of times the original tweet has been retweeted?
Thanks for the quick response Chris.
I have tried @tweet.tweets.count on the tweet show page but I'm getting an error " undefined method `tweets' for #Tweet:0x007ffcab0608d8
Did you mean? tweet
tweet= "
This is showing in the console
=> #<ActiveRecord::Relation [#<Tweet id: 1, user_id: 1, body: "First tweet", tweet_id: nil, created_at: "2018-09-06 04:14:56", updated_at: "2018-09-06 04:14:56">, #<Tweet id: 2, user_id: 2, body: "second tweet", tweet_id: nil, created_at: "2018-09-06 04:16:58", updated_at: "2018-09-06 04:16:58">, #<Tweet id: 3, user_id: 2, body: nil, tweet_id: 1, created_at: "2018-09-06 04:25:34", updated_at: "2018-09-06 04:25:34">, #<Tweet id: 4, user_id: 1, body: nil, tweet_id: 2, created_at: "2018-09-06 04:54:44", updated_at: "2018-09-06 04:54:44">, #<Tweet id: 5, user_id: 1, body: nil, tweet_id: 2, created_at: "2018-09-09 12:09:01", updated_at: "2018-09-09 12:09:01">
Apart from this, everything else work fine for me in this tutorial.
Any solutions for the challenge at the end to add a modal with the ability to add a comment to a retweet?
main thing im struggling with is the form in the modal to add the comment (body) for a retweet