O'Reilly logo

Crafting Rails 4 Applications, 2nd Edition by José Valim

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

Taking It to the Next Level with Devise and Capybara

If any of our applications are going to provide an interface for translations, we should make sure this interface is password-protected and that we can properly test its functionality. In this section, let’s look at Devise,[53] a full-stack authentication solution based on Rack, and take a deeper look at how we can use Capybara to test Rack applications.[54]

Adding Cross-Application Authentication

Devise is an interesting solution for authentication because it provides, in very few lines of code, a whole authentication stack, with sign-in, sign-up, password recovery, and more. It uses Warden to move the authentication handling to the middleware stack,[55] allowing any application, whether ...

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