Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 716 Bytes

README.md

File metadata and controls

24 lines (20 loc) · 716 Bytes

Twittest

Twittest was an Iron Yard homework assignment where we were tasked with building our own version of Twitter. Users can create posts, view a stream of all other users' posts and view a specific users' posts. They can also edit their own profile or password. Users log in with their username, which must be unique.

Users

legolas = User.create({
  email: "test@test.com",
  password: "password", # gets set using has_secure_password and bcrypt
  full_name: "Legolas",
  user_name: "blondie_elf"
  })

Posts

Users have many posts and posts belong to user.

post = Post.new({
  body: "A red sun rises, blood has been spilled this night."
  })

legolas.posts << post
legolas.save