diff options
Diffstat (limited to 'railties/guides/code/getting_started')
-rw-r--r-- | railties/guides/code/getting_started/app/controllers/posts_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/code/getting_started/app/controllers/posts_controller.rb b/railties/guides/code/getting_started/app/controllers/posts_controller.rb index 7e903c984c..1581d4eb16 100644 --- a/railties/guides/code/getting_started/app/controllers/posts_controller.rb +++ b/railties/guides/code/getting_started/app/controllers/posts_controller.rb @@ -62,7 +62,7 @@ class PostsController < ApplicationController respond_to do |format| if @post.update_attributes(params[:post]) format.html { redirect_to @post, notice: 'Post was successfully updated.' } - format.json { head :ok } + format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @post.errors, status: :unprocessable_entity } @@ -78,7 +78,7 @@ class PostsController < ApplicationController respond_to do |format| format.html { redirect_to posts_url } - format.json { head :ok } + format.json { head :no_content } end end end |