From e6898e3b609ed411692206c4ae9516f9ca4f9cf3 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Tue, 26 Apr 2011 22:23:57 +0700 Subject: Change examples in guide to reflect changes from XML -> JSON --- railties/guides/source/action_mailer_basics.textile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/guides/source/action_mailer_basics.textile') diff --git a/railties/guides/source/action_mailer_basics.textile b/railties/guides/source/action_mailer_basics.textile index 56da360972..a6ff8f877d 100644 --- a/railties/guides/source/action_mailer_basics.textile +++ b/railties/guides/source/action_mailer_basics.textile @@ -120,7 +120,7 @@ Now that we have a user model to play with, we will just edit the +app/controlle class UsersController < ApplicationController # POST /users - # POST /users.xml + # POST /users.json def create @user = User.new(params[:user]) @@ -130,10 +130,10 @@ class UsersController < ApplicationController UserMailer.welcome_email(@user).deliver format.html { redirect_to(@user, :notice => 'User was successfully created.') } - format.xml { render :xml => @user, :status => :created, :location => @user } + format.json { render :json => @user, :status => :created, :location => @user } else format.html { render :action => "new" } - format.xml { render :xml => @user.errors, :status => :unprocessable_entity } + format.json { render :json => @user.errors, :status => :unprocessable_entity } end end end -- cgit v1.2.3