From c5439c8650f522ef366abb77f2655153e2d50bc6 Mon Sep 17 00:00:00 2001 From: Mackenzie Morgan Date: Mon, 13 Feb 2017 02:05:02 -0500 Subject: [PATCH] use symbols for status codes --- app/controllers/likes_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/likes_controller.rb b/app/controllers/likes_controller.rb index 8e2c2df76..30f7f17e1 100644 --- a/app/controllers/likes_controller.rb +++ b/app/controllers/likes_controller.rb @@ -10,7 +10,7 @@ class LikesController < ApplicationController format.html { redirect_to @like.likeable } format.json do render(json: render_json(@like, liked_by_member: true), - status: 201) + status: :created) end end end @@ -23,7 +23,7 @@ class LikesController < ApplicationController format.html { redirect_to @like.likeable } format.json do render(json: render_json(@like, liked_by_member: false), - status: 200) + status: :ok) end end end @@ -45,7 +45,7 @@ class LikesController < ApplicationController def failed(like, message) respond_to do |format| - format.json { render(json: { 'error': message }, status: 403) } + format.json { render(json: { 'error': message }, status: :forbidden) } format.html do flash[:error] = message if like && like.likeable