I completed the Michael H. tutorial, and i’m trying to add the
like @replies feature to the app but I’m completely lost. Here is what I
have so far.
I added the in_reply_to column to the Micropost Model and created a
has_many through microposts relationship. I’m lost after that. Any
assistance will be greatly appreciated.
has_many :microposts, dependent: :destroy
has_many :replies, through: :microposts, source: :in_reply_to
class Micropost < ActiveRecord::Base
belongs_to :in_reply_to, class_name: “User”