Iteration G2: Atom Feeds
By using a standard feed format, such as Atom, you can immediately take advantage of a wide variety of preexisting clients. Because Rails already knows about IDs, dates, and links, it can free you from having to worry about these pesky details and let you focus on producing a human-readable summary. We start by adding a new action to the products controller:
|âÂ||@product = Product.find(params[â:idâ])|
|âÂ||@latest_order = @product.orders.order(â:updated_atâ).last|
|âÂ||respond_to âdoâ |format||
A number of different ...