diff options
Diffstat (limited to 'railties/guides/source/action_mailer_basics.textile')
-rw-r--r-- | railties/guides/source/action_mailer_basics.textile | 6 |
1 files changed, 3 insertions, 3 deletions
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 <ruby> 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 |