Skip to content

Instantly share code, notes, and snippets.

@baileylo
Created October 6, 2010 08:10
Show Gist options
  • Save baileylo/613000 to your computer and use it in GitHub Desktop.
Save baileylo/613000 to your computer and use it in GitHub Desktop.
def create
@user = User.new(params[:user])
respond_to do |format|
if @user.save
format.html { redirect_to(:users, :notice => 'Registration successfull.') }
format.xml { render :xml => @user, :status => :created, :location => @user }
else
format.html { render :action => "new" }
format.xml { render :xml => @user.errors, :status => :unprocessable_entity }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment