Skip to content

Instantly share code, notes, and snippets.

@urubatan
Created May 10, 2010 20:50
Show Gist options
  • Save urubatan/396527 to your computer and use it in GitHub Desktop.
Save urubatan/396527 to your computer and use it in GitHub Desktop.
class TestaosController < ApplicationController
respond_to :html, :xml, :js
# GET /testaos
# GET /testaos.xml
def index
@testaos = Testao.all
respond_with @testaos
end
# GET /testaos/1
# GET /testaos/1.xml
def show
@testao = Testao.find(params[:id])
respond_with @testao
end
# GET /testaos/new
# GET /testaos/new.xml
def new
@testao = Testao.new
respond_with @testao
end
# GET /testaos/1/edit
def edit
@testao = Testao.find(params[:id])
end
# POST /testaos
# POST /testaos.xml
def create
@testao = Testao.new(params[:testao])
@testao.save
respond_with @testao
end
# PUT /testaos/1
# PUT /testaos/1.xml
def update
@testao = Testao.find(params[:id])
respond_with @testao
end
# DELETE /testaos/1
# DELETE /testaos/1.xml
def destroy
@testao = Testao.find(params[:id])
@testao.destroy
respond_with @testao
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment