User Functionality

Learn how to add some restrictions to your application based on user status.

Now, you will need to add some user-based functionality. You will do the following:

  1. Configure actions so new links that are created are associated with the user that creates them. You will have noticed that you were not able to create new links after creating an association between User and Link.
  2. Edit links_controller.rb so a non-user only has access to the index and show views.
  3. Configure app/views/links/index.html.erb so a user cannot access the Edit and Destroy paths for links created by a different user.

Get hands-on with 1200+ tech skills courses.