O'Reilly logo

Rails 4 Test Prescriptions by Noel Rappin

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

User Authentication and Authorization

We’ve gotten quite far in our example without adding a user model to it, which we’ll rectify now.

We want to get users and passwords in the system without spending too much time in the setup weeds—that way we can focus our attention on the security issues that having users causes. To let us do that, we’ll use the Devise gem[17] for basic user authentication and focus on how to use Devise as part of our security and testing goals. (Part of me wants to derive user authentication from first principles, and someday when I publish a book from The Purist Press I’ll do that.)

Devise is a big, multifaceted gem, and we’ll only be scratching the surface of what it can do. It handles all kinds of login needs, including ...

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