O'Reilly logo

Rails Crash Course by Anthony Lewis

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 4. Controllers

Rails controllers connect your application’s models and views. Any web requests that your application receives are routed to the appropriate controller. The controller gets data from the model and then renders the appropriate view or redirects to a different location.

In this chapter, we continue working on our blog. Along the way, you’ll learn about controllers in detail. I’ll cover resource representation with REST, routing resources, and the types of actions a controller can take.

Representational State Transfer

Representational State Transfer, or REST, is a client-server software architecture introduced in 2000 by Dr. Roy Fielding, one of the authors of the HTTP specification. REST deals with the representation of resources, ...

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