app/models/user.rb
# defines a proto-feed
# see "following users" for the full implementation
defines a proto-feed
see "following users" for the full implementation
defines a proto - feed see " following users " for the full implementation
def feed
        following_ids = "SELECT followed_id FROM relationships
                         WHERE follower_id = :user_id"
        Micropost.where("user_id IN (#{following_ids}) 
                        OR user_id = :user_id", user_id: id)
    end
def feed following_ids = "SELECT followed_id FROM relationships
                         WHERE follower_id = :user_id" Micropost . where ( "user_id IN (#{following_ids}) 
                        OR user_id = :user_id" , user_id : id ) end
defines a proto-feed
see "following users" for the full implementation
defines a proto - feed see " following users " for the full implementation