Sha256: 5b2835b2c29670782fe60ac845967a5c1923c28cd36393ec0bbd605d3959e742
Contents?: true
Size: 524 Bytes
Versions: 15
Compression:
Stored size: 524 Bytes
Contents
require 'roar/rails' class AlbumsController < ActionController::Base include Roar::Rails::ControllerMethods respond_to :xml represents Album def show @album = Album.find(params[:id]) respond_with @album end def create @album = Album.create(representation) respond_with @album end def update @album = Album.find(params[:id]) @album.songs.delete_all # make PUT behave REST-compliant. @album.update_attributes(representation) respond_with @album end end
Version data entries
15 entries across 15 versions & 1 rubygems