Skip to content

Instantly share code, notes, and snippets.

@Porta
Created March 31, 2011 14:28
Show Gist options
  • Save Porta/896440 to your computer and use it in GitHub Desktop.
Save Porta/896440 to your computer and use it in GitHub Desktop.
class PeopleController < ApplicationController
respond_to :html, :xml, :json
expose(:person)
def create
person.save
respond_with(person)
end
def update
person.update_attributes(params[:person])
respond_with(person)
end
def destroy
person.destroy
respond_with(person)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment