- Read Tutorial
- Watch Guide Video
In this last guide of this section I'd say the easiest one for the last one and that is that I notice that our seeds file has not been updated. Even after we added the concept of users. Let's come in and let's fix that. I'm going to close these out and going into our seeds file you can see that we have topics, that are created blog posts that are associated with them, skills portfolio items and all kinds of cool stuff like that. As great as that is, it also is kind of annoying because every single time that I run
rails db:setup I have to go and register a new user. That's not an ideal scenario so I'm going to come to the very top and I'm going to create some users. First one is going to be an admin users I'm going to say
User.create!( email: "firstname.lastname@example.org", password: "asdfasdf", password_confirmation: "asdfasdf", name: "Admin User", roles: "site_admin" ) puts "1 Admin user created" User.create!( email: "email@example.com", password: "asdfasdf", password_confirmation: "asdfasdf", name: "Regular User", ) puts "1 regular user created"
Let's go and let's clean out our database to verify that this works. So, I'll say
Let's also push up our last code commit. It's going to be
git add .,
git commit -m "Updated seed's file",
git push origin final-changes.
With that being pushed up we can go to github, go to the app which is at DevCamp-portfolio yours is going to be a little bit different. We can create a pull request and merge it.So, create pull request. We did a lot of work in this one and as you can see, looks like we have well over a dozen or so commits. So this is a decent chunk of work. Excellent job going through that I think that is definitely worth it. The changes we made really took the look and feel in the user interface and the user experience up to a whole other level. Now that is all live you can see that we have made 128 code commits throughout this process which is a lot of work.
git checkout master,
This is going to pull down all of our changes and we are good to go. I will see you in the next section where we talk about how to deployer our app to the web.