amie-wilt / assignments

Homework for TIY!
0 stars 0 forks source link

Assignment 7-4 - Microblogging Social Network #34

Closed ambethia closed 9 years ago

ambethia commented 9 years ago

Week 7 - Assignment 4

Microblogging Social Network (aka Twitter Clone)

Objectives

Learning Objectives

After completing this assignment, you should…

After completing this assignment, you be able to effectively use

class Post
  def self.timeline(user)
    follower_ids = user.followers.map(&:id)
    all_ids= follower_ids << user.id
    Post.where(user_id: all_ids).order("created_at DESC")
  end
end

...or perhaps a User automatically follows themeselves when creating their account?

amie-wilt commented 9 years ago

@ambethia: here it is!

https://moomill.herokuapp.com/

https://github.com/amie-wilt/twitter_clone