Updated scheme
Add an example to check for User admin attribute to not be accessible
Made the change edit link to open in a new window
Add tests to make sure that some links don’t appear

When a user isn’t signed in they should not see links for Users, Profile,Setttings
and Sign out
Refactor: Extract a partial for the form inside edit and use it on form

Remove the duplicated form code by refactoring the new.html.erb and edit.html.erb views to use the partial in Listing 9.50. Note that you will have to pass the form variable f explicitly as a local variable, as shown in Listing 9.51. You will also have to update the tests, as the forms aren’t currently exactly the same; identify the slight difference and update the tests accordingly.
Signed-in users have no reason to access the new and create actions

Arrange for such users to be redirected to the root URL if they do try to
hit those pages.
Add test to make sure that the friendly forwarding only forwards to the given URI the first time
Modify destroy action to not let admin to delete themselves