app/models/user.rb
# Returns a user's status feed.
Returns a user's status feed.
Returns a user ' s status feed .
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
Returns a user's status feed.
Returns a user ' s status feed .