- class ItemsController < ApplicationController
- // To notify Rails that we are capable of handling xml and json request
- respond_to : xml, :json
- // To notify that this controller behave as a Restfulie controller
- acts_as_restfulie
- def index
- @items = Item.all
- respond_with @items
- end
- end