Brendan WhitingFront End Web Development Techdegree Graduate 84,633 Points
When did we create the User and Forum models?
I can't seem to find the part of the course where we created the User and Forum models. I see him accessing files that I don't have.
Wout Ceulemans17,601 Points
I know this post is now more than a month old, but for the people who still have the same question: look at the teacher's notes for the instructions on how to create the 'community' project and the User and Forum models.
rails new community cd community rails g model User name:string nickname:string rails g model Forum name:string public:boolean bin/rails db:migrate
A simple way to put some data in is to add this to db/seeds.rb:
User.create(id: 1, name: 'Jay', nickname: 'dadjokes') User.create(id: 2, name: 'Pasan', nickname: 'pasanpr') User.create(id: 5, name: 'Alena', nickname: 'sketchings') Forum.create(id: 1, name: 'Ruby', public: true) Forum.create(id: 3, name: 'PHP', public: true) Forum.create(id: 4, name: 'iOS', public: true) Forum.create(id: 6, name: 'SQL', public: true)
bin/rails db:seed will basically execute the contents of db/seeds.rb in the correct context, just like executing them in the rails console.