Spree Commerce

Try It Now

Spree Gets More Restful

Posted on August 11, 2008 by Sean Schofield

We’ve just merged in a series of changes from the restful branch in git. Several of the Spree models are now fully REST. The original source code was written in the early days of REST before it was fully supported in Rails so we took a pass on implementing it until the Rails implementation settled down. We’ll be finishing up the REST conversion in the next couple of weeks.

If you are planning on using the Spree source code you should also familiarize yourself with the resource_controller plugin. Its an excellent way of standardizing and DRYing up your restful controllers. Fabio Akita has also written a very detailed screencast on using this plugin. Reading up on this plugin will help you to understand what’s going on in the newly restful (and very skinny) controllers.

We’ve also refactored the product form. The single massive form has been replaced by a series of tabs. You can also now add a new product and its picture in a single step. Check out the demo for details.