Chapter 18

Tasks Exercise: Extending the Admin Panel

Ah! Your favorite chapter. The one where you have to do everything yourself… with no help. Right? No? Jokes aside, we really recommend doing the following exercises, so you can be sure you understand everything. It is by doing that you will learn. Plus, it’s the same thing that you did in the previous chapter. Yes, it’s a bit repetitive, but that’s how you will understand it and be able to work on your own engines.

As with Contacts, below are the steps you need to follow, with a few screenshots at the end.

  1. Create a new branch (Chapter-18)
  2. Create a tasks admin controller, an index view and the admin routes (Hint: don’t forget to add the ordered scope to the Contacts Model)
  3. Create the AdminController decorator
  4. Add the override for the admin navigation link and its view
  5. Add the override for the admin index view and its view with the Tasks list
Figure 1: The Tasks summary in the Admin Dashboard
Figure 2: The Tasks list in the admin panel

18.1. Pushing Our Changes

Finally, don’t forget to push your changes to GitHub.

  1. Check the changes:
    git status
  2. Stage them:
    git add .
  3. Commit them:
    git commit -m "Extending the Admin Panel"
  4. Push to your GitHub repo if you’ve configured it:
    git push origin Chapter-18

18.2. Wrap Up

We finally reached the end of this module. Yes, there wasn’t as much learning this time, but now that you know how to extend other engines, you should be able to extend anything you want pretty easily.

18.2.1. Next Step

We’re not going to build more engines in this book. This was the last one. It’s getting boring and you already know how to do it. In the next module we are going to see how to work with your engines and how to package them as gems.