“Rails Refactoring” by Trotter Cashion
Rails Refactoring is an e-book written by Trotter Cashion (of MotionBox) and published by Addison-Wesley. Targeting developers who are tentatively dipping a toe into the world of REST, Rails Refactoring looks at how to turn your old-fashion unRESTian Rails code into the modern REST-capable equivalent. The first major section, for example, delves into respond_to and provides a 'motive', the 'steps' for implementation, and example code samples to back up the steps. Other refactorings, such as CRUD routing and ActiveResource are presented in a similar 'motive', 'steps' and 'examples' format.
Beyond basic refactoring, the e-book has several chapters covering controllers, routes, views, tests, authentication, and the consumption of external REST APIs all from a REST point of view. The RESTful Controllers chapter gets as far as explaining the methods involved, to_xml and MIME content types before the RESTful Routes and Views chapters look at the generation and integration of RESTful URLs in your applications. Curiously, the RESTful Tests and RESTful Authentication chapters are only two pages a-piece with only very cursory information.
At only 74 pages, Rails Refactoring is a quick read and littered with practical knowledge. I fear, though, that any Rails developer who doesn't already use respond_to or have a cursory knowledge of REST is unlikely to be tempted by the examples on show here, and more experienced developed will find Rails Refactoring a little simple going. Still, it's useful information that's well presented, and could make a useful reference to any Rails developer. It costs $14.99 direct from Addison-Wesley or you can read it for free if you're already a member of Safari (an online book system by O'Reilly Media and Pearson Technology Group).
(WARNING: There have been some issues reported about the DRM used within the PDF download. Read the comments left by readers on this post before purchasing.)