Skip to content

@jaydonnell /gist:1117283
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
class UsersController < ApplicationController::Base
respond_to :html, :xml, :json
def show
respond_with(@user = User.find(params[:id]))
end
def index
respond_with(@users = User.all)
end
def create
@user = User.create(params[:user])
respond_with(@user, :location => users_url)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.