O'Reilly logo

Rails 4 in Action: Revised Edition of Rails 3 in Action by Ryan Bigg, Yehuda Katz, Steve Klabnik, and Rebecca Skinner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Authentication

This chapter covers

  • Adding authentication to an application
  • Using the Devise gem
  • More associations, linking tickets to users

You’ve created two resources for your Ticketee application: projects and tickets. Now you’ll add authentication to let users sign in to your application. With this feature, you can track which tickets were created by which users. A little later, you’ll use these user records to allow and deny access to certain parts of the application. To round out the chapter, you’ll create another CRUD interface, this time for the users resource, but with a twist.

The general idea behind having users for this application is that some users are in charge of creating projects (project owners), and others ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required