Sha256: 4a1c3f06cbab5dbffb2043db869b2739480f22a21892670962f7fd6c7a3e97ce
Contents?: true
Size: 354 Bytes
Versions: 15
Compression:
Stored size: 354 Bytes
Contents
class ItemsController < ApplicationController respond_to :xml, :json def index @items = Item.all respond_with @items end def create @item = Item.create(params[:item]) render :text => "", :status => 201, :location => item_url(@item) end def show @item = Item.find(params[:id]) respond_with @item end end
Version data entries
15 entries across 5 versions & 2 rubygems