Sha256: 4de66ac131dc1b86ed4c9595be352a22476a6a694bb1f2fdf60f793c15280a17
Contents?: true
Size: 860 Bytes
Versions: 5
Compression:
Stored size: 860 Bytes
Contents
class PeopleController < ApplicationController respond_to :html # GET /people def index @people = Person.all respond_with(@people) end # GET /people/:id def show @person = Person.find(params[:id]) respond_with(@person) end # GET /people/new def new @person = Person.new respond_with(@person) end # GET /people/:id/edit def edit @person = Person.find(params[:id]) respond_with(@person) end # POST /people def create @person = Person.create(params[:person]) respond_with(@person) end # PUT /people/:id def update @person = Person.find(params[:id]) @person.attributes = params[:person] @person.save respond_with(@person) end # DELETE /people/:id def destroy @person = Person.find(params[:id]) @person.destroy respond_with(@person) end end
Version data entries
5 entries across 5 versions & 1 rubygems