You are previewing The Rails™ 3 Way, Second Edition.

The Rails™ 3 Way, Second Edition

Cover of The Rails™ 3 Way, Second Edition by Obie Fernandez Published by Addison-Wesley Professional

Chapter 3. REST, Resources, and Rails

Before REST came I (and pretty much everyone else) never really knew where to put stuff.

—Jonas Nicklas on the Ruby on Rails mailing list

With version 1.2, Rails introduced support for designing APIs consistent with the REST style. Representational State Transfer (REST) is a complex topic in information theory, and a full exploration of it is well beyond the scope of this chapter.1 We’ll touch on some of the keystone concepts, however. And in any case, the REST facilities in Rails can prove useful to you even if you’re not a REST expert or devotee.

The main reason is that one of the inherent problems that all web developers face is deciding how to name and organize the resources and actions of their application. ...

The best content for your career. Discover unlimited learning on demand for around $1/day.